Class/Object

nlpdata.datasets.wiktionary

Inflections

Related Docs: object Inflections | package wiktionary

Permalink

class Inflections extends AnyRef

Class for easy access to verb inflections.

Backed by Java code (VerbInflectionDictionary) that loads a list of verb forms from a local text file that was scraped from Wiktionary. TODO: make it cross-platform.

Makes heavy use of the "LowerCaseString" abstraction that ensures strings are lower case on the type level.

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

Instance Constructors

  1. new Inflections(inflDict: VerbInflectionDictionary)

    Permalink

    inflDict

    the backing inflection dictionary

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def getAllForms(word: util.LowerCaseStringCapsule.LowerCaseString): Set[util.LowerCaseStringCapsule.LowerCaseString]

    Permalink

    Returns a set of all known inflected forms of a verb.

    Returns a set of all known inflected forms of a verb.

    This handles auxiliary & other verbs. It is designed to also include irregular forms, for example dream(past) -> { dreamed, dreamt }, if we add them manually to extraForms (see Inflections companion object). Also includes contractions.

    word

    a verb (stem not necessary)

    returns

    all possible forms of the verb

  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getInflectedForms(verb: util.LowerCaseStringCapsule.LowerCaseString): Option[InflectedForms]

    Permalink

    Returns the inflected forms for the given verb if it is in the dictionary.

    Returns the inflected forms for the given verb if it is in the dictionary. If it's hyphenated, operates on the suffix after the first hyphen and replaces the prefix at the beginning.

    Also note that this does not handle be-verbs. TODO: handle these in the future?

    returns

    the inflections of the given verb

  12. def getNormalizedModal(verb: util.LowerCaseStringCapsule.LowerCaseString): Any

    Permalink

    Normalizes a modal (i.e., undoes its contraction form), otherwise identity.

  13. def getUninflected(word: util.LowerCaseStringCapsule.LowerCaseString): Option[util.LowerCaseStringCapsule.LowerCaseString]

    Permalink

    The stem of a verb, including "be".

  14. def hasInflectedForms(word: util.LowerCaseStringCapsule.LowerCaseString): Boolean

    Permalink

    Whether a word is present in the dictionary, auxiliary verbs not included.

  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def isCopulaVerb(word: util.LowerCaseStringCapsule.LowerCaseString): Boolean

    Permalink

    Whether a word is a known copula.

  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def isModal(word: util.LowerCaseStringCapsule.LowerCaseString): Boolean

    Permalink

    Whether a word is a known modal verb.

  19. def isUninflected(word: util.LowerCaseStringCapsule.LowerCaseString): Boolean

    Permalink

    Whether a word is a known verb stem.

  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped