[
https://issues.apache.org/jira/browse/OPENNLP-1887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18096645#comment-18096645
]
Kristian Rickert commented on OPENNLP-1887:
-------------------------------------------
OPENNLP-1880 introduces the lexical knowledge base seam (the
LexicalKnowledgeBase interface, the WN-LMF and WNDB readers, the Morphy
lemmatizer). OPENNLP-1887's expansion code (synonyms, hypernyms, hyponyms) is
written directly against that seam and won't compile without it. I confirmed it
in git: 1880's branch is an ancestor of 1887's, with 1887 adding 5 commits on
top. So 1880 has to merge into main first, then 1887 retargets and merges. That
is exactly the blocks relationship.
> Lexical expansion over the knowledge base seam: synonyms, hypernyms, optional
> hyponyms
> --------------------------------------------------------------------------------------
>
> Key: OPENNLP-1887
> URL: https://issues.apache.org/jira/browse/OPENNLP-1887
> Project: OpenNLP
> Issue Type: New Feature
> Components: Sentence Detector
> Reporter: Kristian Rickert
> Assignee: Kristian Rickert
> Priority: Major
>
> STACKED on [#1155|https://github.com/apache/opennlp/pull/1155] (wordnet-api):
> this branch builds on that PR's LexicalKnowledgeBase seam, and since that
> head lives on a fork it cannot be this PR's base ref. Until
> [#1155|https://github.com/apache/opennlp/pull/1155] merges, the diff here
> shows its commits too; only the last commit
> ([{{a000fcc}}|https://github.com/apache/opennlp/commit/a000fcce4959ed4081ca1234c323e957b2e20801])
> is this PR. After [#1155|https://github.com/apache/opennlp/pull/1155] lands,
> the branch rebases onto main and the diff collapses to this change alone.
> Adds LexicalExpander to the opennlp-wordnet module: given a term, it produces
> weighted related terms from a LexicalKnowledgeBase, the synonyms sharing its
> synsets, the lemmas of hypernym ancestors up to a configured depth (following
> both the direct and the instance relation, visited-checked so cyclic data
> terminates), and optionally direct hyponyms. Each expansion carries a
> deterministic heuristic weight (sense-rank decay times depth decay, both
> configurable), results are deduplicated case-insensitively keeping the
> highest weight, the input term is never returned, and ordering is stable. An
> optional Lemmatizer fallback expands inflected input; the Morphy lemmatizer
> of this module plugs in directly, so dogs expands via dog and mice via mouse.
> Tests cover the behavior over a hand-built graph with a controlled shape
> (sense ranking, depth decay, dedupe, cycle termination, hyponym opt-in,
> configuration validation) plus integration over the miniature WN-LMF and WNDB
> fixtures asserting both readers expand identically.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)