public class MalletEmbeddingsAnnotator
extends org.apache.uima.fit.component.JCasAnnotator_ImplBase
WordEmbedding
annotations to tokens/lemmas.Modifier and Type | Field and Description |
---|---|
static String |
PARAM_ANNOTATE_UNKNOWN_TOKENS
Specify how to handle unknown tokens:
If this parameter is not specified, unknown tokens are not annotated.
If an empty float[] is passed, a random vector is generated that is used for each unknown token.
If a float[] is passed, each unknown token is annotated with that vector.
|
static String |
PARAM_LOWERCASE
If set to true (default: false), all tokens are lowercased.
|
static String |
PARAM_MODEL_HAS_HEADER
If set to true (default: false), the first line is interpreted as header line containing the number of entries and the dimensionality.
|
static String |
PARAM_MODEL_IS_BINARY |
static String |
PARAM_MODEL_LOCATION
The file containing the word embeddings.
|
static String |
PARAM_TOKEN_FEATURE_PATH
The annotation type to use for the model.
|
Constructor and Description |
---|
MalletEmbeddingsAnnotator() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(org.apache.uima.UimaContext context) |
void |
process(org.apache.uima.jcas.JCas aJCas) |
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
public static final String PARAM_MODEL_LOCATION
Currently only supports text file format.
public static final String PARAM_MODEL_IS_BINARY
public static final String PARAM_ANNOTATE_UNKNOWN_TOKENS
public static final String PARAM_MODEL_HAS_HEADER
public static final String PARAM_TOKEN_FEATURE_PATH
de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token
.
For lemmas, use de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token/lemma/value
public static final String PARAM_LOWERCASE
public void initialize(org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
initialize
in interface org.apache.uima.analysis_component.AnalysisComponent
initialize
in class org.apache.uima.fit.component.JCasAnnotator_ImplBase
org.apache.uima.resource.ResourceInitializationException
public void process(org.apache.uima.jcas.JCas aJCas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process
in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
org.apache.uima.analysis_engine.AnalysisEngineProcessException
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.