You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2022/09/12 03:58:37 UTC

[incubator-nlpcraft] branch master updated: Update NCFrLemmaPosTokenEnricher.scala

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/master by this push:
     new 723dbffd Update NCFrLemmaPosTokenEnricher.scala
723dbffd is described below

commit 723dbffd9a747558f08348e50f6e11bde2719527
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Sep 11 20:58:31 2022 -0700

    Update NCFrLemmaPosTokenEnricher.scala
---
 .../lightswitch/nlp/token/enricher/NCFrLemmaPosTokenEnricher.scala      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nlpcraft-examples/lightswitch-fr/src/main/scala/org/apache/nlpcraft/examples/lightswitch/nlp/token/enricher/NCFrLemmaPosTokenEnricher.scala b/nlpcraft-examples/lightswitch-fr/src/main/scala/org/apache/nlpcraft/examples/lightswitch/nlp/token/enricher/NCFrLemmaPosTokenEnricher.scala
index 0e22e24b..b4a783be 100644
--- a/nlpcraft-examples/lightswitch-fr/src/main/scala/org/apache/nlpcraft/examples/lightswitch/nlp/token/enricher/NCFrLemmaPosTokenEnricher.scala
+++ b/nlpcraft-examples/lightswitch-fr/src/main/scala/org/apache/nlpcraft/examples/lightswitch/nlp/token/enricher/NCFrLemmaPosTokenEnricher.scala
@@ -31,7 +31,7 @@ class NCFrLemmaPosTokenEnricher extends NCTokenEnricher:
     override def enrich(req: NCRequest, cfg: NCModelConfig, toks: List[NCToken]): Unit =
         val tags = FrenchTagger.INSTANCE.tag(toks.map(_.getText).asJava).asScala
 
-        require(toks.size == tags.size)
+        require(toks.sizeIs == tags.size)
 
         toks.zip(tags).foreach { case (tok, tag) =>
             val readings = tag.getReadings.asScala