Class

com.johnsnowlabs.nlp.annotators

DateMatcherTranslator

Related Doc: package annotators

Permalink

class DateMatcherTranslator extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DateMatcherTranslator
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DateMatcherTranslator(policy: DateMatcherTranslatorPolicy)

    Permalink

Type Members

  1. type DateMatcherIndexedToken = (String, Int)

    Permalink

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. val AccentsPattern: String

    Permalink
  5. val DigitsPattern: String

    Permalink
  6. val EmptyStr: String

    Permalink
  7. val Encoding: String

    Permalink
  8. val English: String

    Permalink
  9. val JsonSuffix: String

    Permalink
  10. val KeyPlaceholder: String

    Permalink
  11. val NameKey: String

    Permalink
  12. val NotAvailable: String

    Permalink
  13. val NotDetected: String

    Permalink
  14. val NotFound: String

    Permalink
  15. val PunctuationPattern: String

    Permalink
  16. val SkipChar: String

    Permalink
  17. val SpaceChar: String

    Permalink
  18. val SupportedLanguagesFilePath: String

    Permalink
  19. val TranslationDataBaseDir: String

    Permalink
  20. val ValuePlaceholder: String

    Permalink
  21. def _processSourceLanguageInfo(text: String, sourceLanguage: String): Map[String, Set[String]]

    Permalink

    Load available language keys to process further matches

    Load available language keys to process further matches

    text

    : text to match language against.

    returns

    a map containing the matching languages.

  22. def adjustPlurality(text: String): String

    Permalink
  23. def applyTranslation(translatedIndexedToken: Array[(String, Int)], text: String): String

    Permalink

    Apply translation switching token where an index has been translated using the dictionary matching.

    Apply translation switching token where an index has been translated using the dictionary matching.

    translatedIndexedToken

    : the translated index token to replace in text.

    text

    : the original text where translation is applied.

    returns

    the text translated using token replacement.

  24. final def asInstanceOf[T0]: T0

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  30. def getKeyFromDictionaryValue(toBeReplaced: Array[String], sourceLanguage: String): Iterable[(String, String)]

    Permalink
  31. def getPolicy(): DateMatcherTranslatorPolicy

    Permalink

    Return one policy in [single, multi] associated to this translator

  32. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. def listify(any: Any): List[Any]

    Permalink
  35. def loadDictionary(language: String = English): Map[String, Any]

    Permalink

    Load dictionary from supported language repository.

    Load dictionary from supported language repository.

    language

    the language dictionary to load. Default is English.

    returns

    a map containing the language dictionary or throws an exception.

  36. def matchIndexedToken: (DateMatcherIndexedToken, Map[String, Any]) ⇒ DateMatcherIndexedToken

    Permalink

    Matches the indexed text token against the passed dictionary.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  40. def preprocessSortedByLengthMatches(sortedMatches: List[String], policy: DateMatcherTranslatorPolicy): List[String]

    Permalink
  41. def processSourceLanguageInfo(text: String, sourceLanguage: String): Map[String, Set[String]]

    Permalink

    Process date matches with the source language.

    Process date matches with the source language.

    text

    : the text to detect.

    returns

    the detected language as tuple of matched languages with their frequency.

  42. def searchKeyFromValuesMatch(dictionary: Map[String, Any], k: String, toBeReplaced: String): (String, String)

    Permalink
  43. def stringValuesToRegexes(regexValuesIntersection: Set[String], sourceLanguage: String): Set[Regex]

    Permalink
  44. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  46. def translate(text: String, sourceLanguage: String, destination: String = English): String

    Permalink

    Translate the text from source language to destination language.

    Translate the text from source language to destination language.

    sourceLanguage

    the source language.

    destination

    the destination language.

    returns

    the translated text from source language to destination language.

  47. def translateBySentence(text: String, sourceLanguageInfo: Map[String, Set[String]], policy: DateMatcherTranslatorPolicy): String

    Permalink

    Translate sentence from source info.

    Translate sentence from source info.

    text

    : sentence to translate.

    sourceLanguageInfo

    : the source info map.

    returns

    the translated sentence.

  48. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped