Always return classifier results as suggestion

The classifier results are spliced into the suggestion list at second
place. When linking they are only used if nlp didn't find anything.
This commit is contained in:
Eike Kettner
2021-01-21 21:05:28 +01:00
parent 021ac568ae
commit 4cba96f390
6 changed files with 71 additions and 22 deletions

View File

@ -26,6 +26,7 @@ object LearnClassifierTask {
): Task[F, Args, Unit] =
learnTags(cfg, analyser)
.flatMap(_ => learnItemEntities(cfg, analyser))
.flatMap(_ => Task(_ => Sync[F].delay(System.gc())))
private def learnItemEntities[F[_]: Sync: ContextShift](
cfg: Config.TextAnalysis,