zensols.nlparse.feature.word-count

Feature utility functions. See zensols.nlparse.feature.lang.

*word-count-config*

dynamic

Configuration for word-count-* and calculate-word* functions.

calculate-feature-stats

(calculate-feature-stats anons)

Calculate feature statistics during training.

  • anons a sequence of parsed annotations

label-count-score-features

(label-count-score-features panon feature-stats)

Generate count score features from trained statistics.

  • panon is the parsed annotation to generate features on
  • feature-stats is the trained stats from calculate-feature-stats.

label-word-count-feature-metas

(label-word-count-feature-metas thing)

Return the feature metadatas for label-count-score-features.

top-count-scores

(top-count-scores num-counts panon features-stats)

Return the top num-counts as a list of strings.

  • panon* is the parsed annotation to generate features on
  • feature-stats is the trained stats from calculate-feature-stats.