You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "songwanging (JIRA)" <ji...@apache.org> on 2015/09/10 19:01:46 UTC
[jira] [Created] (OPENNLP-816) useless else if branch
songwanging created OPENNLP-816:
-----------------------------------
Summary: useless else if branch
Key: OPENNLP-816
URL: https://issues.apache.org/jira/browse/OPENNLP-816
Project: OpenNLP
Issue Type: Bug
Affects Versions: tools-1.5.3
Reporter: songwanging
Priority: Minor
In method getFeatures of class SimilarityModel(opennlp-tools\src\main\java\opennlp\tools\coref\sim\SimilarityModel.java)
The else_if branch presented in the following code snippet, tries to extract features from Context, while this else_if branch examined a condiction without further actions, which makes itself useless.
To fix this bug, we should add more specific code to extract features, or directly delete this else_if branch.
private List<String> getFeatures(Context np1, Context np2) {
...
else if (isNumber(np2)) {}
else {
...
}
}
else {
//System.err.println("unknown group for " + np1.headToken);
}
...
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)