You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Joern Kottmann (JIRA)" <ji...@apache.org> on 2016/12/26 12:56:58 UTC
[jira] [Closed] (OPENNLP-816) useless else if branch
[ https://issues.apache.org/jira/browse/OPENNLP-816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joern Kottmann closed OPENNLP-816.
----------------------------------
Resolution: Won't Fix
The code is now in the sandbox and currently not maintained.
> 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)