Packages

object MathExpr

Expression in a language to represent terms in HoTT and trees representing them in prose, including partially collapsed trees. At the level of structure, we do not make distinctions between words and phrases; the distinction is specific to trees, where a word is a leaf.

We model expressions that will mostly become Terms in HoTT, mostly following Naproche. At the upper level are sentential phrases. We typically start with a tree that encodes a sentential phrase.

We have various case classes for syntax, but a single trait

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MathExpr
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class AP(ap: T) extends AdjectivalPhrase with Product with Serializable

    Adjectival phrase as a singl tree - usually just an adjective

  2. type AdjectivalPhrase = MathExpr

    Abstract adjectival phrase

  3. case class AreAdj(coProperty: AdjectivalPhrase) extends VerbPhrase with Product with Serializable

    are ...

    are ... property given by a transitive adjective, e.e., independent.

  4. case class ConjSP(sentences: Vector[SententialPhrase]) extends SententialPhrase with Product with Serializable

    Conjunction of sentential phrases.

  5. case class ConjunctNP(nps: Vector[NounPhrase]) extends NounPhrase with Product with Serializable

    A noun phrase that is a conjuction (and) of noun phrases.

  6. case class ConjunctSP(sps: Vector[SententialPhrase]) extends SententialPhrase with Product with Serializable

    A conjunction of sentential phrases forming a sentential phrase.

  7. case class Core(optNoun: Option[NounPhrase], quantterms: Vector[QuantTerm] = Vector()) extends MathExpr with Product with Serializable

    The core of a determiner phrase, which is a noun, a list of quant-terms or a noun followed by a list of quant-terms

  8. case class DP(det: Determiner, adjectives: Vector[AdjectivalPhrase] = Vector(), optNoun: Option[NounPhrase] = None, quantTerms: Option[NounPhrase] = None, post: Vector[PostModifier] = Vector()) extends MathExpr with Product with Serializable

    Determiner phrase: this is the main composite tree.

  9. type Determiner = MathExpr

    Determiner - this is a closed class.

  10. case class DisjSP(sentences: Vector[SententialPhrase]) extends SententialPhrase with Product with Serializable

    Disjunction of sentential phrases.

  11. case class DisjunctNP(nps: Vector[NounPhrase]) extends NounPhrase with Product with Serializable

    A noun phrase that is a disjunction (or) of noun phrases.

  12. case class DisjunctSP(sps: Vector[SententialPhrase]) extends SententialPhrase with Product with Serializable

    A disjunction of sentential phrases forming a sentential phrase.

  13. case class ExistentialSP(sentence: SententialPhrase, exists: Boolean = true, unique: Boolean = false) extends SententialPhrase with Product with Serializable

    Existential-style quantified sentence, but also allowing at most one and precisely one.

  14. case class ForAllSP(sentence: SententialPhrase) extends SententialPhrase with Product with Serializable

    Universally quantified sentence.

  15. case class Formula(text: String) extends NounPhrase with Product with Serializable
  16. case class IfThen(premise: SententialPhrase, consequence: SententialPhrase) extends SententialPhrase with Product with Serializable

    An if_then_ sentential phrase, translating to implies.

  17. case class Iff(premise: SententialPhrase, consequence: SententialPhrase) extends SententialPhrase with Product with Serializable

    A bi-implication, kept separate from two implications for definitions etc

  18. case class IsAdj(coProperty: AdjectivalPhrase) extends VerbPhrase with Product with Serializable

    is ...

    is ... property given by an intransitive adjective.

  19. case class IsAdjPrep(adj: AdjectivalPhrase, pp: PP) extends VerbPhrase with Product with Serializable

    is ...

    is ... prep ... property given by a transitive adjective

  20. case class IsNoun(property: NounPhrase) extends VerbPhrase with Product with Serializable

    is ...

    is ... property given by a noun.

  21. case class IsPrep(pp: PP) extends VerbPhrase with Product with Serializable

    is ...

    is ... property given by a prespositional phrase

  22. case class IsSuchThat(st: SuchThat) extends VerbPhrase with Product with Serializable

    is such that ...

    is such that ... property

  23. case class It(coref: Option[MathExpr]) extends MathExpr with Product with Serializable

    Pronoun 'it' with an optional coreference

  24. case class JJ(word: String) extends AdjectivalPhrase with Product with Serializable
  25. case class JJPP(adj: MathExpr, pps: Vector[MathExpr]) extends AdjectivalPhrase with Product with Serializable
  26. case class NN(word: String) extends NounPhrase with Product with Serializable
  27. case class NP(npv: Vector[MathExpr]) extends NounPhrase with Product with Serializable

    A Noun phrase as a single tree.

  28. case class NPVP(np: NounPhrase, vp: VerbPhrase) extends SententialPhrase with Product with Serializable

    A NP-VP decomposed sentential phrase

  29. case class NegSP(sentence: SententialPhrase) extends SententialPhrase with Product with Serializable

    Negation of a sentence.

  30. case class NegVP(vp: VerbPhrase) extends VerbPhrase with Product with Serializable

    Negated verb phrase

  31. type NounPhrase = MathExpr

    Abstract Noun phrase

  32. case class PP(negated: Boolean = false, prep: Preposition, np: NounPhrase) extends PostModifier with Product with Serializable

    Prepositional phrase, usually translates to an argument, sometimes to a property.

    Prepositional phrase, usually translates to an argument, sometimes to a property. Can be a Post-modifier in a determiner phrase, where it acts as an argument.

  33. type PostModifier = MathExpr

    Post-modifier in a determiner phrase.

  34. case class Prep(word: String) extends Preposition with Product with Serializable

    A generic preposition

  35. type Preposition = MathExpr

    Preposition - this is a closed class.

  36. type QuantTerm = MathExpr

    A quantterm (in the Naproche sense) - a variable or something more complex such as n_k.

    A quantterm (in the Naproche sense) - a variable or something more complex such as n_k. Unlike Naproche, we may also have pronouns.

  37. case class SP(spv: Vector[MathExpr]) extends SententialPhrase with Product with Serializable

    A single tree for a sentential phrase

  38. type SententialPhrase = MathExpr

    An abstract sentential phrase, representing a term.

  39. case class SuchThat(condition: MathExpr) extends PostModifier with Product with Serializable

    A such that clause

  40. type T = Tree
  41. case class ThatIsSP(sentences: Vector[SententialPhrase]) extends SententialPhrase with Product with Serializable

    Sentential phrases connected by "i.e., " or "so, ".

  42. case class They(corefs: Vector[MathExpr]) extends MathExpr with Product with Serializable

    Pronoun 'they' with (psoosibly empty) coreferences

  43. case class VB(word: String) extends VerbPhrase with Product with Serializable
  44. case class VP(vpv: Vector[MathExpr]) extends VerbPhrase with Product with Serializable

    A Verb phrase as a single tree

  45. case class VPIf(vp: VerbPhrase, ifc: MathExpr) extends MathExpr with Product with Serializable

    to take care of an idiosyncracy of the StanfordParser, with 'if' SP attached to a VP in an NPVP

  46. case class Variable(variable: T) extends QuantTerm with Product with Serializable

    A variable, the simplest form of QuantTerm

  47. case class VerbAdj(vp: VerbPhrase, ap: AdjectivalPhrase) extends VerbPhrase with Product with Serializable

    A transitive verb and adjective.

  48. case class VerbObj(vp: VerbPhrase, obj: NounPhrase) extends VerbPhrase with Product with Serializable

    A verb phrase formed by a transitive verb applied to its object.

  49. case class VerbPP(verb: MathExpr, pps: Vector[MathExpr]) extends VerbPhrase with Product with Serializable
  50. type VerbPhrase = MathExpr

    Abstract verb phrase

  51. case class Which(condition: MathExpr) extends PostModifier with Product with Serializable

Value Members

  1. implicit def rw: upickle.default.ReadWriter[MathExpr]
  2. implicit def rwT: upickle.default.ReadWriter[T]
  3. val tq: String
  4. object AP extends Serializable
  5. object AreAdj extends Serializable
  6. object ConjSP extends Serializable
  7. object ConjunctNP extends Serializable
  8. object ConjunctSP extends Serializable
  9. object Core extends Serializable
  10. object DP extends Serializable
  11. object Determiner
  12. object DisjSP extends Serializable
  13. object DisjunctNP extends Serializable
  14. object DisjunctSP extends Serializable
  15. object ExistentialSP extends Serializable
  16. case object Exists extends MathExpr with Product with Serializable

    representing existential 'there', purely as a parsing target

  17. object ForAllSP extends Serializable
  18. object Formula extends Serializable
  19. object IfThen extends Serializable
  20. object Iff extends Serializable
  21. object IsAdj extends Serializable
  22. object IsAdjPrep extends Serializable
  23. object IsNoun extends Serializable
  24. object IsPrep extends Serializable
  25. object IsSuchThat extends Serializable
  26. object It extends Serializable
  27. object JJ extends Serializable
  28. object JJPP extends Serializable
  29. object NN extends Serializable
  30. object NP extends Serializable
  31. object NPVP extends Serializable
  32. object NegSP extends Serializable
  33. object NegVP extends Serializable
  34. object PP extends Serializable
  35. object Prep extends Serializable
  36. object Preposition

    Various prepositions

  37. object SP extends Serializable
  38. object SuchThat extends Serializable
  39. object ThatIsSP extends Serializable
  40. object They extends Serializable
  41. object VB extends Serializable
  42. object VP extends Serializable
  43. object VPIf extends Serializable
  44. object Variable extends Serializable
  45. object VerbAdj extends Serializable
  46. object VerbObj extends Serializable
  47. object VerbPP extends Serializable
  48. object Which extends Serializable