treat
treat copied to clipboard
Treat being loaded causes slowness in stanford-core-nlp
When treat is loaded in my Gemfile, stanford-core-nlp runs substantially slower.
Here's the code that runs quite slow. I don't think it's anything very complex.
text.get(:sentences).each do |sentence|
sentence.get(:tokens).each do |token|
value = token.get(:original_text).to_s
pos = token.get(:part_of_speech).to_s
et = token.get(:named_entity_tag).to_s
ner_list << [et,value]
insert_unique(pos_hash, pos, value)
end
end
I've enclosed a couple of profile trace images that shows the same code before and after loading treat.
Hope this helps and apologies if it's down to my ignorance.
Regards,
Neil
With treat:
Without treat: