Liking cljdoc? Tell your friends :D

dk.simongray.datalinguist.tree

Everything to do with trees, chiefly of the constituency grammar kind.

Functions dealing with tregex in CoreNLP (constituency grammar patterns) have been wrapped so as to mimic the existing Clojure Core regex functions. The tregex-result function also mimics re-groups and serves a similar purpose, although rather than returning groups it returns named nodes defined in the pattern.

Everything to do with trees, chiefly of the constituency grammar kind.

Functions dealing with tregex in CoreNLP (constituency grammar patterns) have
been wrapped so as to mimic the existing Clojure Core regex functions. The
`tregex-result` function also mimics re-groups and serves a similar purpose,
although rather than returning groups it returns named nodes defined  in the
pattern.
raw docstring

tregex-findclj

(tregex-find m)
(tregex-find p t)

Return the next tregex match, if any, of tokens to pattern, using TokenSequenceMatcher.find().

Return the next tregex match, if any, of tokens to pattern, using
TokenSequenceMatcher.find().
raw docstring

tregex-matcherclj

(tregex-matcher p t)

Create a TregexMatcher from p and Tree t; use in tregex-find.

Create a TregexMatcher from `p` and Tree `t`; use in tregex-find.
raw docstring

tregex-matchesclj

(tregex-matches p t)

Returns the match, if any, of tokens to pattern, using edu.stanford.nlp.trees.tregex.TregexMatcher.matches(). Uses tregex-result to return any named nodes.

Returns the match, if any, of tokens to pattern, using
edu.stanford.nlp.trees.tregex.TregexMatcher.matches().
Uses tregex-result to return any named nodes.
raw docstring

tregex-patternclj

(tregex-pattern s)

Return an instance of TregexPattern, for use, e.g. in tregex-matcher.

Return an instance of TregexPattern, for use, e.g. in tregex-matcher.
raw docstring

tregex-resultclj

(tregex-result m)

Returns the named nodes from the most recent match/find. If there are no named nodes/relations, returns the match itself. If there are named nodes/relations, returns a vector with the first element being the match itself and the second a map of names -> nodes.

Returns the named nodes from the most recent match/find.
If there are no named nodes/relations, returns the match itself.
If there are named nodes/relations, returns a vector with the first element
being the match itself and the second a map of names -> nodes.
raw docstring

tregex-seqclj

(tregex-seq p t)

Return a lazy list of matches of TregexPattern p in Tree t.

Return a lazy list of matches of TregexPattern `p` in Tree `t`.
raw docstring

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

× close