[
https://issues.apache.org/jira/browse/OPENNLP-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16579729#comment-16579729
]
ASF GitHub Bot commented on OPENNLP-1213:
-----------------------------------------
kottmann commented on a change in pull request #328: OPENNLP-1213: Use ja for
Japanese language code rather than jp
URL: https://github.com/apache/opennlp/pull/328#discussion_r209928880
##########
File path:
opennlp-tools/src/main/java/opennlp/tools/sentdetect/lang/Factory.java
##########
@@ -72,8 +72,8 @@ public SDContextGenerator
createSentenceContextGenerator(String languageCode) {
return thEosCharacters;
} else if ("pt".equals(languageCode) || "por".equals(languageCode)) {
return ptEosCharacters;
- } else if ("jp".equals(languageCode) || "jpn".equals(languageCode)) {
- return jpEosCharacters;
+ } else if ("ja".equals(languageCode) || "jpn".equals(languageCode)) {
Review comment:
And changing it will break it, so I suggest it would be better to remove it
instead.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Use ja for Japanese language code rather than jp
> ------------------------------------------------
>
> Key: OPENNLP-1213
> URL: https://issues.apache.org/jira/browse/OPENNLP-1213
> Project: OpenNLP
> Issue Type: Bug
> Affects Versions: 1.9.0
> Reporter: Koji Sekiguchi
> Priority: Minor
> Fix For: 1.9.1
>
>
> It seems that Factory of sentdetect uses "jp" for Japanese language code but
> I think it is country code. Let's use "ja" instead.
> We could leave "jp" for back-compat, but I don't think we need to do it. So
> I'll just replace "jp" with "ja" in the patch.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)