CoreNLP运行速度太慢
问题描述:
我打算使用Corenlp来评论一些亚马逊评论,但是,我等了6个多小时,没有产生任何输出。CoreNLP运行速度太慢
1. the review is about 1MB;
2. the cluster has 12CPU, 64G memory;
3. the command is
java -cp "*" -Xmx64g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,ner,sentiment -outputFormat json -file amazon_apple_comments_4.csv
发生了什么事?它太慢了吗?
答
这对于1Mb文档来说太慢了。尝试运行较少的注释器来缩小哪一个花费最多的时间。 tokenize
和ssplit
注释器应该非常快; pos
有点慢,但不坏; ner
比pos
慢,但在亚马逊的1亿美元评论中,它不应该找到许多命名实体。我从来没有使用过sentiment
,但我认为它不平凡。