public class EmbeddedClassifier
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
categories |
Constructor and Description |
---|
EmbeddedClassifier()
Constructor of the embedded classification used in assigning default categories
|
Modifier and Type | Method and Description |
---|---|
org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.Double> |
assignCategory(java.lang.String val)
Given a textual description, search the dictionary for the most similar tag and assign the corresponding category.
|
private void |
buildDefaultClassificationYML()
Parses a resource YML file and populates the dictionary of tags and their correspondence to embedded categories.
|
private java.util.Map<java.lang.String,java.util.List<java.lang.String>> categories
public EmbeddedClassifier()
private void buildDefaultClassificationYML() throws java.io.FileNotFoundException
java.io.FileNotFoundException
public org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.Double> assignCategory(java.lang.String val)
val
- The textual description of a category (may be a single word, or a multi-word characterization)