public class TreeVectorizer
extends java.lang.Object
| Constructor and Description |
|---|
TreeVectorizer()
Uses word vectors from the passed in word2vec model
|
TreeVectorizer(TreeParser parser)
Uses the given parser and model
for vectorization of strings
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Tree> |
getTrees(java.lang.String sentences)
Vectorizes the passed in sentences
|
java.util.List<Tree> |
getTreesWithLabels(java.lang.String sentences,
java.util.List<java.lang.String> labels)
Vectorizes the passed in sentences
|
java.util.List<Tree> |
getTreesWithLabels(java.lang.String sentences,
java.lang.String label,
java.util.List<java.lang.String> labels)
Vectorizes the passed in sentences
|
public TreeVectorizer(TreeParser parser)
parser - the parser to use for converting
strings to treespublic TreeVectorizer()
throws java.lang.Exception
java.lang.Exceptionpublic java.util.List<Tree> getTrees(java.lang.String sentences) throws java.lang.Exception
sentences - the sentences to convert to treesjava.lang.Exceptionpublic java.util.List<Tree> getTreesWithLabels(java.lang.String sentences, java.lang.String label, java.util.List<java.lang.String> labels) throws java.lang.Exception
sentences - the sentences to convert to treeslabel - the label for the sentencelabels - all of the possible labels for the treesjava.lang.Exceptionpublic java.util.List<Tree> getTreesWithLabels(java.lang.String sentences, java.util.List<java.lang.String> labels) throws java.lang.Exception
sentences - the sentences to convert to treeslabels - all of the possible labels for the treesjava.lang.Exception