Packages

t

com.johnsnowlabs.nlp.annotators

DateMatcherUtils

trait DateMatcherUtils extends Params

Linear Supertypes
Params, Serializable, Serializable, Identifiable, AnyRef, Any
Known Subclasses
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. DateMatcherUtils
  2. Params
  3. Serializable
  4. Serializable
  5. Identifiable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

getParam

  1. def getAnchorDateDay: Int

  2. def getAnchorDateMonth: Int

  3. def getAnchorDateYear: Int

  4. def getDefaultDayWhenMissing: Int

  5. def getInputFormats: Array[String]

  6. def getOutputFormat: String

  7. def getReadMonthFirst: Boolean

  8. def getSourceLanguage: String

    To get to use or not the multi-language translation.

param

  1. val aggressiveMatching: BooleanParam

    Whether to aggressively attempt to find date matches, even in ambiguous or less common formats (Default: false)

  2. val anchorDateDay: Param[Int]

    Add an anchor day for the relative dates such as a day after tomorrow (Default: -1).

    Add an anchor day for the relative dates such as a day after tomorrow (Default: -1). By default it will use the current day. The first day of the month has value 1.

  3. val anchorDateMonth: Param[Int]

    Add an anchor month for the relative dates such as a day after tomorrow (Default: -1).

    Add an anchor month for the relative dates such as a day after tomorrow (Default: -1). By default it will use the current month. Month values start from 1, so 1 stands for January.

  4. val anchorDateYear: Param[Int]

    Add an anchor year for the relative dates such as a day after tomorrow (Default: -1).

    Add an anchor year for the relative dates such as a day after tomorrow (Default: -1). If it is not set, the by default it will use the current year. Example: 2021

  5. val defaultDayWhenMissing: IntParam

    Which day to set when it is missing from parsed input (Default: 1)

  6. def getAggressiveMatching: Boolean

    To get aggressive matching Strategy

  7. def getRelaxedFactoryStrategy: String

    To get matched strategy to search relaxed dates by ordered rules by more exhaustive to less Strategy

  8. val inputFormats: StringArrayParam

    Date Matcher regex patterns.

  9. val outputFormat: Param[String]

    Output format of parsed date (Default: "yyyy/MM/dd")

  10. val readMonthFirst: BooleanParam

    Whether to interpret dates as MM/DD/YYYY instead of DD/MM/YYYY (Default: true)

  11. val relaxedFactoryStrategy: Param[String]

    Matched strategy to search relaxed dates by ordered rules by more exhaustive to less Strategy

  12. def setAggressiveMatching(value: Boolean): DateMatcherUtils.this.type

    To set aggressive matching Strategy

  13. def setRelaxedFactoryStrategy(matchStrategy: Format = MatchStrategy.MATCH_FIRST): DateMatcherUtils.this.type

    To set matched strategy to search relaxed dates by ordered rules by more exhaustive to less Strategy

  14. val sourceLanguage: Param[String]

    Source language for explicit translation

setParam

  1. def setAnchorDateDay(value: Int): DateMatcherUtils.this.type

  2. def setAnchorDateMonth(value: Int): DateMatcherUtils.this.type

  3. def setAnchorDateYear(value: Int): DateMatcherUtils.this.type

  4. def setDefaultDayWhenMissing(value: Int): DateMatcherUtils.this.type

  5. def setInputFormats(value: Array[String]): DateMatcherUtils.this.type

  6. def setOutputFormat(value: String): DateMatcherUtils.this.type

  7. def setReadMonthFirst(value: Boolean): DateMatcherUtils.this.type

  8. def setSourceLanguage(value: String): DateMatcherUtils.this.type

    To set or not the source language for explicit translation.

Ungrouped

  1. abstract def copy(extra: ParamMap): Params
    Definition Classes
    Params
  2. abstract val uid: String
    Definition Classes
    Identifiable
  3. final def clear(param: Param[_]): DateMatcherUtils.this.type
    Definition Classes
    Params
  4. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  5. def explainParams(): String
    Definition Classes
    Params
  6. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  7. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  8. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  9. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  10. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  11. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  12. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  13. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  14. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  15. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  16. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  17. def relativeExactContentParse(possibleDate: RuleMatch): MatchedDateTime
  18. val relativeFuturePattern: String
  19. val relativePastPattern: String

    Used for past relative date matches

  20. final def set[T](param: Param[T], value: T): DateMatcherUtils.this.type
    Definition Classes
    Params
  21. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  22. def tomorrowYesterdayContentParse(date: RuleMatch): MatchedDateTime