public void add(String text, MentionType type)
    {
        MentionType previousType = entities.add(process(text), type);
        if (previousType != null && !previousType.equals(type))
            throw new IllegalArgumentException("Text is already associated with a different tag: " + text);
    }
public void add ( String text , MentionType type ) { MentionType previousType = entities . add ( process ( text ) , type ) ; if ( previousType != null && ! previousType . equals ( type ) ) throw new IllegalArgumentException ( "Text is already associated with a different tag: " + text ) ; }
Adds a single entry to the dictionary. The text is processed by the tokenizer and the resulting tokens are stored.

@param text
The text to find
@param type
The {@link MentionType} to tag the text with