Hello,
I tried fastly and locally to use Rasa Model to detect trained entities and to find out the difference between models.
modelsentitiestockcomparison_app.zip
How i worked :
First, i was using tock-docker
I choose the Rasa Model in configuration, and then i try the parsing from Language Understanding/ New Sentences with another new sentences for exemple with new town destination.
The result is that with other models i get the right intent and entities trained but here the intent and the entities are not found (tock:unkown).
I found an error in BotAdmin first :
2022-02-02T10:43:18.410 [vert.x-worker-thread-7] ERROR ai.tock.nlp.core.service.NlpCoreService - Unknown nlp engine type : NlpEngineType(name=rasa)
java.lang.IllegalStateException: Unknown nlp engine type : NlpEngineType(name=rasa)
at ai.tock.nlp.model.service.engine.NlpEngineRepository.getProvider$tock_nlp_model_service(NlpEngineRepository.kt:42)
at ai.tock.nlp.model.service.engine.NlpEngineRepository.getIntentClassifier(NlpEngineRepository.kt:68)
at ai.tock.nlp.model.service.NlpClassifierService.classifyIntent(NlpClassifierService.kt:69)
at ai.tock.nlp.core.service.NlpCoreService$parse$1.invoke(NlpCoreService.kt:70)
at ai.tock.nlp.core.service.NlpCoreService$parse$1.invoke(NlpCoreService.kt:67)
at ai.tock.nlp.core.service.NlpCoreService.parse(NlpCoreService.kt:113)
at ai.tock.nlp.core.service.NlpCoreService.parse(NlpCoreService.kt:67)
at ai.tock.nlp.front.service.ParserService.parse(ParserService.kt:253)
at ai.tock.nlp.front.service.ParserService.parse(ParserService.kt:142)
at ai.tock.nlp.front.client.FrontClient.parse(FrontClient.kt)
at ai.tock.nlp.admin.AdminService.parseSentence(AdminService.kt:65)
at ai.tock.nlp.admin.AdminVerticle$configureServices$$inlined$blockingJsonPost$default$5.invoke(WebVerticle.kt:710)
at ai.tock.nlp.admin.AdminVerticle$configureServices$$inlined$blockingJsonPost$default$5.invoke(WebVerticle.kt:338)
at ai.tock.shared.vertx.WebVerticle.executeBlocking$lambda-15(WebVerticle.kt:624)
at ai.tock.shared.vertx.WebVerticle$$Lambda$234/0x0000000000000000.handle(Unknown Source)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
at io.vertx.core.impl.ContextImpl$$Lambda$71/0x0000000000000000.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:836)
So I switched to local Tock in IntelliJ instead of the dockerized
I think the issue is that the Rasa module is not loaded on backend ? I added it in the following poms.xml tock-nlptock-nlp-front-ioc, just like OpenNlp seems to work. (maybe wrong ?)
Then i get the following error :
2022-02-02T10:51:51.681 [vert.x-worker-thread-10] ERROR ai.tock.nlp.core.service.NlpCoreService - ai.tock.nlp.model.ModelNotInitializedException: no intent model found for IntentContextKey(applicationName=app:Rasa, language=fr, engineType=NlpEngineType(name=rasa))
java.util.concurrent.ExecutionException: ai.tock.nlp.model.ModelNotInitializedException: no intent model found for IntentContextKey(applicationName=app:Rasa, language=fr, engineType=NlpEngineType(name=rasa))
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:113)
at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:244)
at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2317)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2283)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
at com.google.common.cache.LocalCache.get(LocalCache.java:3966)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4863)
at ai.tock.nlp.model.service.engine.NlpModelRepository.getIntentModelHolder(NlpModelRepository.kt:119)
at ai.tock.nlp.model.service.engine.NlpEngineRepository.getIntentClassifier(NlpEngineRepository.kt:69)
at ai.tock.nlp.model.service.NlpClassifierService.classifyIntent(NlpClassifierService.kt:69)
at ai.tock.nlp.core.service.NlpCoreService$parse$1.invoke(NlpCoreService.kt:70)
at ai.tock.nlp.core.service.NlpCoreService$parse$1.invoke(NlpCoreService.kt:67)
at ai.tock.nlp.core.service.NlpCoreService.parse(NlpCoreService.kt:113)
at ai.tock.nlp.core.service.NlpCoreService.parse(NlpCoreService.kt:67)
at ai.tock.nlp.front.service.ParserService.parse(ParserService.kt:253)
at ai.tock.nlp.front.service.ParserService.parse(ParserService.kt:142)
at ai.tock.nlp.front.client.FrontClient.parse(FrontClient.kt)
at ai.tock.nlp.admin.AdminService.parseSentence(AdminService.kt:65)
at ai.tock.nlp.admin.AdminVerticle$configureServices$$inlined$blockingJsonPost$default$5.invoke(WebVerticle.kt:710)
at ai.tock.nlp.admin.AdminVerticle$configureServices$$inlined$blockingJsonPost$default$5.invoke(WebVerticle.kt:338)
at ai.tock.shared.vertx.WebVerticle.executeBlocking$lambda-15(WebVerticle.kt:624)
at ai.tock.shared.vertx.WebVerticle$$Lambda$234/0x0000000000000000.handle(Unknown Source)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
at io.vertx.core.impl.ContextImpl$$Lambda$71/0x0000000000000000.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:836)
Caused by: ai.tock.nlp.model.ModelNotInitializedException: no intent model found for IntentContextKey(applicationName=app:Rasa, language=fr, engineType=NlpEngineType(name=rasa))
at ai.tock.nlp.model.service.engine.NlpModelRepository.loadIntentModel(NlpModelRepository.kt:144)
at ai.tock.nlp.model.service.engine.NlpModelRepository.getIntentModelHolder$lambda-1$lambda-0(NlpModelRepository.kt:120)
at ai.tock.nlp.model.service.engine.NlpModelRepository$$Lambda$196/0x0000000000000000.call(Unknown Source)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4868)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
... 25 common frames omitted
2022-02-02T10:51:51.693 [vert.x-worker-thread-11] INFO org.mongodb.driver.connection - Opened connection [connectionId{localValue:33, serverValue:341}] to mongo3:27019
But then i saw this in RasaNlpModelBuilder.kt :
L55 // for rasa, intent & entity models are the same so... do nothing
Questions :
How do I understand this ?
The Rasa model needs to find an intent with its entities contrary to OpenNlp or Stanford that can find the trained entities without intent ?
The Rasa model is not working for parsing entities ?
The Rasa model is working only on api mode?
A documentation for the differences between Rasa/ Stanford and OpenNlp and what it cover in Tock ?
Hello, I tried fastly and locally to use Rasa Model to detect trained entities and to find out the difference between models. modelsentitiestockcomparison_app.zip
How i worked :
First, i was using tock-docker
I choose the Rasa Model in configuration, and then i try the parsing from Language Understanding/ New Sentences with another new sentences for exemple with new town destination.
The result is that with other models i get the right intent and entities trained but here the intent and the entities are not found (tock:unkown).
I found an error in BotAdmin first :
So I switched to local Tock in IntelliJ instead of the dockerized
I think the issue is that the Rasa module is not loaded on backend ? I added it in the following poms.xml
tock-nlp
tock-nlp-front-ioc
, just like OpenNlp seems to work. (maybe wrong ?)Then i get the following error :
But then i saw this in
RasaNlpModelBuilder.kt
: L55 // for rasa, intent & entity models are the same so... do nothingQuestions :