Liking cljdoc? Tell your friends :D

duckling.learn


corpus->datasetclj

(corpus->dataset {context :context tests :tests :as corpus}
                 rules
                 feature-extractor)

Takes a corpus and a feature extractor and builds a dataset (phase 1.a. on duckling.md).

Takes a corpus and a feature extractor and builds a dataset (phase 1.a. on duckling.md).
sourceraw docstring

extract-route-featuresclj

(extract-route-features token)

Extracts names of previous routes used to produce this route token. This is the feature extractor we use.

Extracts names of previous routes used to produce this route token.
This is the feature extractor we use.
sourceraw docstring

judge-mlclj

(judge-ml stash classifiers)

Choose the winning token using a classifier. Computes prob of each rule according to their routes.

Choose the winning token using a classifier.
Computes prob of each rule according to their routes.
sourceraw docstring

(print-dataset dataset)

Print dataset to STDOUT

Print dataset to STDOUT
sourceraw docstring

route-probclj

(route-prob route classifiers)

Computes the log prob for a route.

Computes the _log_ prob for a route.
sourceraw docstring

sentence->datasetclj

(sentence->dataset s context check rules feature-extractor dataset)

Takes a sentence, context, check (fn that determines if a winner is valid), feature extractor, and existing dataset. Returns an enriched dataset: [{<rule-name> [features, output]}] Output is true if the rule was contributing successfully, false otherwise

Takes a sentence, context, check (fn that determines if a winner is valid), 
feature extractor, and existing dataset.
Returns an enriched dataset:
[{<rule-name> [features, output]}]
Output is true if the rule was contributing successfully, false otherwise
sourceraw docstring

simple-feature-extractorclj

(simple-feature-extractor token)

A very simple one to show if it works. Not used for now. Takes a token, returns a vector of features (can be anything as long as the model understands it).

A very simple one to show if it works. Not used for now.
Takes a token, returns a vector of features
(can be anything as long as the model understands it).
sourceraw docstring

subtokensclj

(subtokens token)

Get a set of all the tokens in the tree who eventually produced the given token (including token itself)

Get a set of all the tokens in the tree who eventually produced the given token
(including token itself)
sourceraw docstring

train-classifiersclj

(train-classifiers corpus rules fextractor)

Given a corpus and a set of rules, train a classifier per rule

Given a corpus and a set of rules, train a classifier per rule
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close