public class Fragment
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Fragment(Dictionary dictionary,
java.lang.String text,
java.util.Locale language)
Default invocation where all the characterizations are computed
|
Fragment(Dictionary dictionary,
java.lang.String text,
java.util.Locale language,
boolean includeBow,
boolean includeCharNgrams,
boolean includeWordNgrams,
boolean includePseudoCognates,
int N) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
get(RepresentationType representation) |
java.util.Map<java.lang.String,java.lang.Double> |
getNormalized(RepresentationType representation) |
java.lang.String |
getPlain() |
java.util.Map<java.lang.String,java.lang.Double> |
getWeighted(RepresentationType representation) |
int |
size(RepresentationType representation) |
public Fragment(Dictionary dictionary, java.lang.String text, java.util.Locale language)
dictionary
- external dictionary to codify the stringstext
- language
- public Fragment(Dictionary dictionary, java.lang.String text, java.util.Locale language, boolean includeBow, boolean includeCharNgrams, boolean includeWordNgrams, boolean includePseudoCognates, int N)
dictionary
- external dictionary to codify the stringstext
- language
- includeBow
- whether BoW representations should be includedincludeCharNgrams
- whether cNg representations should be includedpublic int size(RepresentationType representation)
representation
- public java.lang.String getPlain()
public java.util.List<java.lang.String> get(RepresentationType representation)
representation
- Fragment.[CNG,BOW] for the required representationpublic java.util.Map<java.lang.String,java.lang.Double> getWeighted(RepresentationType representation)
representation
- Fragment.[CNG,BOW] for the required representationpublic java.util.Map<java.lang.String,java.lang.Double> getNormalized(RepresentationType representation)
representation
- Fragment.[CNG,BOW] for the required representation