com.johnsnowlabs.nlp.annotators.parser.dep
Universal Dependencies source files
Dependency treebank source files
Gets a iterable TreeBank
input annotations columns currently used
Number of iterations in training, converges to better accuracy
Gets annotation column name going to generate
Gets annotation column name going to generate
Gets a list of ConnlU training sentences
Input annotation type : DOCUMENT, POS, TOKEN
Input annotation type : DOCUMENT, POS, TOKEN
columns that contain annotations necessary to run this annotator AnnotatorType is used both as input and output columns if not specified
columns that contain annotations necessary to run this annotator AnnotatorType is used both as input and output columns if not specified
Number of iterations in training, converges to better accuracy (Default: 10
)
Output annotation type : DEPENDENCY
Output annotation type : DEPENDENCY
Path to a file in CoNLL-U format
Dependency treebank folder with files in Penn Treebank format
Overrides required annotators column if different than default
Overrides required annotators column if different than default
Number of iterations in training, converges to better accuracy
Overrides annotation column name when transforming
Overrides annotation column name when transforming
requirement for pipeline transformation validation.
requirement for pipeline transformation validation. It is called on fit()
takes a Dataset and checks to see if all the required annotation types are present.
takes a Dataset and checks to see if all the required annotation types are present.
to be validated
True if all the required types are present, else false
A list of (hyper-)parameter keys this annotator can take. Users can set and get the parameter values through setters and getters, respectively.
Required input and expected output annotator types
Trains an unlabeled parser that finds a grammatical relations between two words in a sentence.
For instantiated/pretrained models, see DependencyParserModel.
Dependency parser provides information about word relationship. For example, dependency parsing can tell you what the subjects and objects of a verb are, as well as which words are modifying (describing) the subject. This can help you find precise answers to specific questions.
The required training data can be set in two different ways (only one can be chosen for a particular model):
setDependencyTreeBank
setConllU
Apart from that, no additional training data is needed.
See DependencyParserApproachTestSpec for further reference on how to use this API.
Example
TypedDependencyParserApproach to extract labels for the dependencies