[
https://issues.apache.org/jira/browse/OPENNLP-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072130#comment-13072130
]
William Colen commented on OPENNLP-239:
---------------------------------------
The asStringSet returns an special implementation of Set. It relies on the
dictionary field entrySet that is a Set<StringListWrapper>, so the hashcode and
equals are override and the implementation use the flag. Also the returned
Set<String> overrides the contains method:
public boolean contains(Object obj) {
boolean result = false;
if (obj instanceof String) {
String str = (String) obj;
result = entrySet.contains(new StringListWrapper(new StringList(str),
caseSensitive));
}
return result;
}
it wraps the string with the StringListWrapper adding the flag so the
entrySet.contains(..) should work.
> Case Sensitivie Flag & Custom Tag Dictionary
> --------------------------------------------
>
> Key: OPENNLP-239
> URL: https://issues.apache.org/jira/browse/OPENNLP-239
> Project: OpenNLP
> Issue Type: New Feature
> Components: Parser
> Affects Versions: tools-1.5.1-incubating
> Reporter: mark meiklejohn
> Assignee: James Kosin
> Fix For: tools-1.5.2-incubating
>
>
> Unable to set case sensitive flag as per TreebankParser 1.3.1 or use a custom
> tag dictionary
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira