Parse an utterance using the Stanford CoreNLP and the ClearNLP SRL.
This is the main client entry point to the package. A default out of the box parser works that comes with components listed in [[zensols.nlparse.config/all-components]].
If you want to customzie or add your own parser plug in, see
the zensols.nlparse.config
namespace.
Parse an utterance using the Stanford CoreNLP and the ClearNLP SRL. This is the main client entry point to the package. A default out of the box parser works that comes with components listed in [[zensols.nlparse.config/all-components]]. If you want to customzie or add your own parser plug in, see the [[zensols.nlparse.config]] namespace.
(in-range? outter inner)
Return whether inner range sits in inclusive range outter. Both
parameters have the form: [start end]
.
Return whether **inner** range sits in inclusive range **outter**. Both parameters have the form: `[start end]`.
(mention-for-token panon token)
Return a mention for token tok (if any).
Return a mention for token **tok** (if any).
(mentions panon
&
{:keys [mention-keys]
:or {mention-keys [:mentions :tok-re-mentions]}})
Get all mentions from parse annotation panon.
[:mentions :tok-re-mentions]
Get all mentions from parse annotation **panon**. Keys ---- * **:mention-keys** top level keys of mentions to use and defaults to `[:mentions :tok-re-mentions]`
(overlap? a b)
Return whether two ranges overlap inclusively. Both parameters have the
form: [start end]
.
Return whether two ranges overlap inclusively. Both parameters have the form: `[start end]`.
(parse utterance)
Parse natural language utterance returning a symbol expression tree of it's meaning.
This returns a symbolic expression (map of maps). A definition of these and structure of these annotations are given here.
See test
token-regex
for example of entity-tag
.
Parse natural language **utterance** returning a symbol expression tree of it's meaning. This returns a symbolic expression (map of maps). A definition of these and structure of these annotations are [given here](https://github.com/plandes/clj-nlp-parse/blob/master/doc/annotation-definitions.md). See [test token-regex](https://github.com/plandes/clj-nlp-parse/blob/v0.0.11/test-resources/token-regex.txt#L3) for example of `entity-tag`.
Alphabetical list of part-of-speech tags used in the Penn Treebank Project.
Alphabetical list of part-of-speech tags used in the [Penn Treebank Project](https://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html).
(pos-description pos-tag)
Get a human readable description of pos-tag.
Get a human readable description of *pos-tag*.
(pos-tag-type tag)
Return the POS tag type (ie. verb
yeilds VB
).
The return (function range) is the input to pos-tags
.
Return the POS tag type (ie. `verb` yeilds `VB`). The return (function range) is the input to [[pos-tags]].
(pos-tag-types)
Return types of POS tags (i.e. noun
, verb
, etc).
See pos-tags
.
Return types of POS tags (i.e. `noun`, `verb`, etc). See [[pos-tags]].
(pos-tags)
(pos-tags type)
Get a sequence of POS tags based on type (if given) and all otherwise.
type is a symbol and one of noun
, verb
, adjective
, adverb
, and
wh
.
See pos-tag-types
.
Get a sequence of POS tags based on **type** (if given) and all otherwise. **type** is a symbol and one of `noun`, `verb`, `adjective`, `adverb`, and `wh`. See [[pos-tag-types]].
(root-dependency sent)
Get the text of the root node of the dependency tree.
Get the text of the root node of the dependency tree.
(sent panon index)
Get the 0-based indexth sentence.
Get the 0-based **index**th sentence.
(sentiment-score-to-label sentiment-score)
Create a human readable tag from the sentiment score.
See sentimnet-labels
.
Create a human readable tag from the sentiment score. See [[sentimnet-labels]].
All labels returned by sentiment-score-to-label
in order of positive to
negative.
All labels returned by [[sentiment-score-to-label]] in order of positive to negative.
(token panon index)
Get the 0-based indexth token.
Get the 0-based **index**th token.
(token-in-range? token range)
Return whether token tok is in tuple range.
Return whether token **tok** is in tuple **range**.
(token-mentions panon)
(token-mentions panon mentions)
Return mentions with a :tokens
key that includes token maps from the
sentence level.
Return mentions with a `:tokens` key that includes token maps from the sentence level.
(tokens panon)
Get all tokens across all sentences.
Get all tokens across all sentences.
(tokens-by-sentence panon sent-index token-range)
Return the tokens for sent-index in the token-range.
Return the tokens for **sent-index** in the **token-range**.
(tokens-for-mention panon mention)
Return tokens for mention.
Return tokens for **mention**.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close