[
https://issues.apache.org/jira/browse/OPENNLP-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642998#comment-17642998
]
ASF GitHub Bot commented on OPENNLP-1403:
-----------------------------------------
mawiesne commented on code in PR #445:
URL: https://github.com/apache/opennlp/pull/445#discussion_r1038968731
##########
opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetector.java:
##########
@@ -20,14 +20,29 @@
import java.io.Serializable;
/**
- * The interface for LanguageDetector which provide the @{@link Language}
according to the context.
+ * The interface for {@link LanguageDetector} which predicts the {@link
Language} for a context.
*/
public interface LanguageDetector extends Serializable {
+ /**
+ * Predicts the {@link Language languages} for the full {@code content}
length.
+ *
+ * @param content The textual content to detect potential {@link Language
languages} from.
+ * @return the predicted languages
+ */
Language[] predictLanguages(CharSequence content);
+ /**
+ * Predicts the {@link Language} for the full {@code content} length.
+ *
+ * @param content The textual content to detect potential {@link Language
languages} from.
+ * @return the language with the highest confidence
+ */
Language predictLanguage(CharSequence content);
+ /**
+ * @return Retrieves an array of language (codes) that are supported by a
{@link LanguageDetector}.
Review Comment:
Ya, noticed this already. I'd prefer upper-cased start of sentences. Found
both variants all over the place, so there seems to be no real convention in
place. C/Should be sanitized in future changes, I guess.
> Enhance JavaDoc in opennlp.tools.langdetect and opennlp.tools.languagemodel
> packages
> ------------------------------------------------------------------------------------
>
> Key: OPENNLP-1403
> URL: https://issues.apache.org/jira/browse/OPENNLP-1403
> Project: OpenNLP
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 2.1.0
> Reporter: Martin Wiesner
> Priority: Minor
> Fix For: 2.1.1
>
>
> The JavaDoc of the _opennlp.tools.langdetect_ and
> _opennlp.tools.languagemodel_ packages suffer from several inconsistencies
> and missing descriptions. Moreover, several typos are present that need
> sanitizing.
> It needs enhancements and/or additions to provide more clarity for readers of
> that part of the OpenNLP API.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)