aonotas / deep-crf

An implementation of Conditional Random Fields (CRFs) with Deep Learning Method

Home Page:http://deep-crf.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supported tag format

massongit opened this issue · comments

Is supported tag format by deep-crf "[BI] - {Tag Name}" and "O" only?

I think deep-crf supports BIES-{Tag Name} and O.

Accoding to source code, "[ES] - {Tag Name}" are only supported in evaluate mode (That aren't supported in train and test mode).

def replace_S_E_tags(tag_lists):
def rep_func(tag):
tag = re.sub(r'^S-', "B-", tag)
tag = re.sub(r'^E-', "I-", tag)
return tag
return [[rep_func(tag) for tag in tags] for tags in tag_lists]