Packages

c

com.johnsnowlabs.nlp.annotators

DateMatcherTranslator

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)

Type Members

  1. type DateMatcherIndexedToken = (String, Int)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val AccentsPattern: String
  5. val DigitsPattern: String
  6. val EmptyStr: String
  7. val Encoding: String
  8. val English: String
  9. val JsonSuffix: String
  10. val KeyPlaceholder: String
  11. val NameKey: String
  12. val NotAvailable: String
  13. val NotDetected: String
  14. val NotFound: String
  15. val PunctuationPattern: String
  16. val SkipChar: String
  17. val SpaceChar: String
  18. val SupportedLanguagesFilePath: String
  19. val TranslationDataBaseDir: String
  20. val ValuePlaceholder: String
  21. def _processSourceLanguageInfo(text: String, sourceLanguage: String): Map[String, Set[String]]

    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
  23. def applyTranslation(translatedIndexedToken: Array[(String, Int)], text: String): String

    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
    Definition Classes
    Any
  25. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  28. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. def getKeyFromDictionaryValue(toBeReplaced: Array[String], sourceLanguage: String): Iterable[(String, String)]
  31. def getPolicy(): DateMatcherTranslatorPolicy

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

  32. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. def listify(any: Any): List[Any]
  35. def loadDictionary(language: String = English): Map[String, Any]

    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

    Matches the indexed text token against the passed dictionary.

  37. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  38. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. def preprocessSortedByLengthMatches(sortedMatches: List[String], policy: DateMatcherTranslatorPolicy): List[String]
  41. def processSourceLanguageInfo(text: String, sourceLanguage: String): Map[String, Set[String]]

    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)
  43. def stringValuesToRegexes(regexValuesIntersection: Set[String], sourceLanguage: String): Set[Regex]
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. def translate(text: String, sourceLanguage: String, destination: String = English): String

    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

    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
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped