首页 > 解决方案 > Apache UIMA:在运行时修改字典注释器

问题描述

Apache UIMA 字典* 是编译时对象。字典必须预先定义。

是否有任何机制可以在运行时向字典添加条目?任何模式或解决方法?

*由 IBM Watson Explorer Content Analytics 实施

谢谢

标签: apachedictionaryuima

解决方案


The dictionaries are loaded at the first use of the engine. What I did in a previous project was that I add a filewatch to the directory that contains all the ruta logic (ruta scripts and additional resources) and at a change event, I started in a background thread a new engine. After the new engine is loaded I send a dummy request into the engine (so everything is initialized) and when that's completed I replaced the live engine with the new engine.

With that approach we had a system where we can did live updates to ruleset. (scripts, configuration and dictionary entries)


推荐阅读