apache - Apache UIMA:在运行时修改字典注释器
问题描述
Apache UIMA 字典* 是编译时对象。字典必须预先定义。
是否有任何机制可以在运行时向字典添加条目?任何模式或解决方法?
*由 IBM Watson Explorer Content Analytics 实施
谢谢
解决方案
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)
推荐阅读
- python - PyTorch - 另一个张量中对应值的索引
- node.js - NGNIX 反向代理默认设置
- python - 树的根(输入)的定义实际上是什么
- python - 我从 tweepy 收集的推文不会保存到 CSV 文件中?
- javascript - puppeteer 是否支持 PUT 方法
- r - bookdown 文件中公式的布局
- spring - 将百里香叶变量作为方法中的参数传递
- typescript - 为什么会出现错误?我应该怎么办?
- java - jre/jre-1.7.0/jre-1.7.0-openjdk/jre-openjdk/jre-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64的区别
- mysql - 在 PHP SQL 中搜索数据位置