[ 
https://issues.apache.org/jira/browse/OPENNLP-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla closed OPENNLP-1937.
------------------------------------
    Resolution: Fixed

Fixed by https://github.com/apache/opennlp/pull/1310 (6331d6e19).

> Expose text embeddings as a generic SPI interface
> -------------------------------------------------
>
>                 Key: OPENNLP-1937
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1937
>             Project: OpenNLP
>          Issue Type: Improvement
>            Reporter: Kristian Rickert
>            Assignee: Kristian Rickert
>            Priority: Major
>             Fix For: 3.0.0
>
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> Core has no contract for "text in, vector out". \{{WordVectorTable}} looks up 
> a stored vector for a single word, and \{{SentenceVectorsDL}} produces 
> sentence vectors but only through its own class, so nothing can accept an 
> embedder without knowing exactly which implementation it is holding.
> This adds \{{opennlp.tools.embeddings.TextEmbedder}} to opennlp-api: 
> \{{embed(CharSequence)}}, a defaulted \{{embedAll(List)}} for implementations 
> that batch better than they loop, and \{{dimension()}}. 
> \{{SentenceVectorsDL}} implements it, so the interface ships with a working 
> implementation in core rather than as a shape nobody uses yet.
> The reason to do it now rather than later: a static embedding add-on is 
> coming, and an add-on can only implement a contract that exists in a released 
> core version. Without this, every add-on invents its own embedder type, none 
> of them interoperate, and moving to a shared one afterwards breaks their 
> users.  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to