Xiaonan Li

Results 113 comments of Xiaonan Li

Very thank you for your quick response!! It will be a great help for me. Actually I can provide another code snippet which may be related to the code above...

> > Hello, I have read your work "PyCG: Practical Call Graph Generation in Python", and think it is valuable, helpful and insightful. However, when I try to scan this...

@seanxiaoyan yes, it is rare but it is grammatical in python.. Since the author says PYCG should detect it, I will wait for him to figure out it..

hello, would you mind me asking when this bug can be fixed?

1.是的,数据集的格式一般采用conll格式,可以参考 https://github.com/jiesutd/LatticeLSTM 里的input format. 2.可以先用当前模型的对应的Vocabulary将这个句子转为ID,然后输入给模型,模型接收的参数一般为tensor,因此需要将ID list转为对应tensor。你遇到的这个问题可能是由于predict的时候没有加batch的那一维,在深度学习场景下,一般接收的输入是成batch的,对于句子的id序列来说,对应的tensor形状通常为[batch,seq_len]

模型执行的可能只是序列标注过程,因此模型给出的输出应该是对应着[batch,seq_len,label_type_num]这么一个tensor,如果要获得最终的实体信息,可能需要先将这个label id tensor转为字符串形式的label list,然后利用fastNLP.core.metrics中的将label序列转为span信息的方法来将它转换成实体信息,如_bioes_tag_to_spans(对应的标签编码需要一致)

> @LeeSureman 您是否有代码样例呢? http://www.fastnlp.top/docs/fastNLP/tutorials/%E5%BA%8F%E5%88%97%E6%A0%87%E6%B3%A8.html 可以参照这个页面

这个只用在msra数据集上,这个setting是follow的之前的工作,文章里有说

I met the same problem as you met, even after I canceled the tick of the "Only apply highlights to editors which are visible in the scrolled view"