Package

com.xiaomi.duckling.dimension.time

duration

Permalink

package duration

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

Type Members

  1. case class DurationData(value: Int, grain: Grain, latent: Boolean = false, fuzzy: Boolean = false) extends ResolvedValue with Resolvable with Product with Serializable

    Permalink

    时间段

    时间段

    value

    时长

    grain

    时长单位

    latent

    是否是潜在时间

    fuzzy

    是否是模糊时间(几天)

  2. trait Examples extends DimExamples

    Permalink
  3. trait Rules extends DimRules

    Permalink

Value Members

  1. object Duration extends Dimension with Rules with Examples with Product with Serializable

    Permalink
  2. def isADecade: Predicate

    Permalink
  3. def isFuzzyNotLatentDuration: Predicate

    Permalink
  4. def isMonth: Predicate

    Permalink
  5. def isNotLatentDuration: Predicate

    Permalink
  6. def isNotLatentGrain: Predicate

    Permalink
  7. def timesOneAndAHalf(grain: Grain, n: Int): Option[DurationData]

    Permalink
  8. def tt(v: Int, g: Grain): Token

    Permalink
  9. def withGrain(g: Grain, d: DurationData): DurationData

    Permalink

    Convert a duration to the given grain, rounded to the nearest integer.

    Convert a duration to the given grain, rounded to the nearest integer. For example, 1 month is converted to 4 weeks.

Inherited from AnyRef

Inherited from Any

Ungrouped