1 下载安装文件
安装apache:sudo apt install apache2
下载brat http://brat.nlplab.org/
http://brat.nlplab.org/installation.html#placing_data
2 解压之后安装./install.sh -u
3 运行python standalone.py
启动成功之后就可以从浏览器进入了http://127.0.0.1:8001/index.xhtml
4修改配置
http://brat.nlplab.org/configuration.html
4.1 支持中文
brat本身是不支持中文的,如果在配置文件里定义中文会报错,解决办法是修改./server/src/projectconfig.py文件的第163行,加上中文支持即可:n = re.sub(u'[^a-zA-Z\u4e00-\u9fa5<>,0-9_-]', '_', n) 注释以前的n = re.sub(r'[^a-zA-Z0-9_-]', '_', n)
4.2 填加自己ontology中定义的entity,relation,property
brat通过配置文件来决定对语料的标注可以满足何种任务,包括四个文件
- annotation.conf: annotation type configuration
- visual.conf: annotation display configuration
- tools.conf: annotation tool configuration
- kb_shortcuts.conf: keyboard shortcut tool configuration
一般只需要修改annotation.conf即可
https://blog.csdn.net/qq_16949707/article/details/88763945
https://wetest.qq.com/lab/view/31.html?
https://blog.csdn.net/everlasting_188/article/details/79962947