Skip to content

Make lazy loading of the language models optional #79

@davidecaroselli

Description

@davidecaroselli

Hello!

running the very first detection really takes a lot of time. Moreover, it depends on the actual language detected:

detector.detectLanguageOf("This is an example") // takes ~8 seconds
detector.detectLanguageOf("This is an example") // takes ~4 ms
detector.detectLanguageOf("Questo è un esempio") // takes ~14 seconds

So my question is: how can I create a "warmup" procedure to run once and have all models loaded?
Very trivial implementation: run detect with a multi-language sample. Is there anything more elegant than that?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions