charlesashby / entity-sentiment-analysis Goto Github PK
View Code? Open in Web Editor NEWVarious ops for handling several entities in a document, perform anaphora resolution, clustering, etc.
Various ops for handling several entities in a document, perform anaphora resolution, clustering, etc.
So, the parse_document creates no sentiment for the below tweet. Do you know what can be fixed?
go, Bernie #DemDebate
also for example for the below sentence:
python parse_doc.py
Parsing Document...
Tokenizing sentences...
Done!
Anaphora resolution for sentence: idk but it feels like trumps real talk got a little too real tonight
Done!
Named Entity Clustering:
('child is: ', Tree('S', [Tree('NP', [Tree('NP', [Tree('NN', ['idk'])]), Tree('PP', [Tree('CC', ['but']), Tree('NP', [Tree('S', [Tree('NP', [Tree('PRP', ['it'])]), Tree('VP', [Tree('VBZ', ['feels']), Tree('PP', [Tree('IN', ['like']), Tree('NP', [Tree('NNS', ['trumps'])])])])]), Tree('JJ', ['real']), Tree('NN', ['talk'])])])]), Tree('VP', [Tree('VBD', ['got']), Tree('NP', [Tree('DT', ['a']), Tree('JJ', ['little'])]), Tree('NP-TMP', [Tree('RB', ['too']), Tree('JJ', ['real']), Tree('NN', ['tonight'])])])]))
(ROOT
(S
(NP
(NP (NN idk))
(PP
(CC but)
(NP
(S
(NP (PRP it))
(VP (VBZ feels) (PP (IN like) (NP (NNS trumps)))))
(JJ real)
(NN talk))))
(VP
(VBD got)
(NP (DT a) (JJ little))
(NP-TMP (RB too) (JJ real) (NN tonight)))))
('*************Node label is: ', u'ROOT')
('child is: ', Tree('NP', [Tree('NP', [Tree('NN', ['idk'])]), Tree('PP', [Tree('CC', ['but']), Tree('NP', [Tree('S', [Tree('NP', [Tree('PRP', ['it'])]), Tree('VP', [Tree('VBZ', ['feels']), Tree('PP', [Tree('IN', ['like']), Tree('NP', [Tree('NNS', ['trumps'])])])])]), Tree('JJ', ['real']), Tree('NN', ['talk'])])])]))
('child is: ', Tree('VP', [Tree('VBD', ['got']), Tree('NP', [Tree('DT', ['a']), Tree('JJ', ['little'])]), Tree('NP-TMP', [Tree('RB', ['too']), Tree('JJ', ['real']), Tree('NN', ['tonight'])])]))
(S
(NP
(NP (NN idk))
(PP
(CC but)
(NP
(S
(NP (PRP it))
(VP (VBZ feels) (PP (IN like) (NP (NNS trumps)))))
(JJ real)
(NN talk))))
(VP
(VBD got)
(NP (DT a) (JJ little))
(NP-TMP (RB too) (JJ real) (NN tonight))))
('*************Node label is: ', u'S')
___________I am here
('*************subchild_labels are: ', [u'NP', u'PP'])
('child is: ', Tree('NP', [Tree('NN', ['idk'])]))
('child is: ', Tree('PP', [Tree('CC', ['but']), Tree('NP', [Tree('S', [Tree('NP', [Tree('PRP', ['it'])]), Tree('VP', [Tree('VBZ', ['feels']), Tree('PP', [Tree('IN', ['like']), Tree('NP', [Tree('NNS', ['trumps'])])])])]), Tree('JJ', ['real']), Tree('NN', ['talk'])])]))
(NP
(NP (NN idk))
(PP
(CC but)
(NP
(S
(NP (PRP it))
(VP (VBZ feels) (PP (IN like) (NP (NNS trumps)))))
(JJ real)
(NN talk))))
('*************Node label is: ', u'NP')
('child is: ', Tree('VBD', ['got']))
('child is: ', Tree('NP', [Tree('DT', ['a']), Tree('JJ', ['little'])]))
('child is: ', Tree('NP-TMP', [Tree('RB', ['too']), Tree('JJ', ['real']), Tree('NN', ['tonight'])]))
(VP
(VBD got)
(NP (DT a) (JJ little))
(NP-TMP (RB too) (JJ real) (NN tonight)))
('*************Node label is: ', u'VP')
('child is: ', Tree('NN', ['idk']))
(NP (NN idk))
('*************Node label is: ', u'NP')
('child is: ', Tree('CC', ['but']))
('child is: ', Tree('NP', [Tree('S', [Tree('NP', [Tree('PRP', ['it'])]), Tree('VP', [Tree('VBZ', ['feels']), Tree('PP', [Tree('IN', ['like']), Tree('NP', [Tree('NNS', ['trumps'])])])])]), Tree('JJ', ['real']), Tree('NN', ['talk'])]))
(PP
(CC but)
(NP
(S
(NP (PRP it))
(VP (VBZ feels) (PP (IN like) (NP (NNS trumps)))))
(JJ real)
(NN talk)))
('*************Node label is: ', u'PP')
('child is: ', u'got')
(VBD got)
('*************Node label is: ', u'VBD')
('child is: ', Tree('DT', ['a']))
('child is: ', Tree('JJ', ['little']))
(NP (DT a) (JJ little))
('*************Node label is: ', u'NP')
('child is: ', Tree('RB', ['too']))
('child is: ', Tree('JJ', ['real']))
('child is: ', Tree('NN', ['tonight']))
(NP-TMP (RB too) (JJ real) (NN tonight))
('*************Node label is: ', u'NP-TMP')
('child is: ', u'idk')
(NN idk)
('*************Node label is: ', u'NN')
('child is: ', u'but')
(CC but)
('*************Node label is: ', u'CC')
('child is: ', Tree('S', [Tree('NP', [Tree('PRP', ['it'])]), Tree('VP', [Tree('VBZ', ['feels']), Tree('PP', [Tree('IN', ['like']), Tree('NP', [Tree('NNS', ['trumps'])])])])]))
('child is: ', Tree('JJ', ['real']))
('child is: ', Tree('NN', ['talk']))
(NP
(S (NP (PRP it)) (VP (VBZ feels) (PP (IN like) (NP (NNS trumps)))))
(JJ real)
(NN talk))
('*************Node label is: ', u'NP')
('child is: ', u'a')
(DT a)
('*************Node label is: ', u'DT')
('child is: ', u'little')
(JJ little)
('*************Node label is: ', u'JJ')
('child is: ', u'too')
(RB too)
('*************Node label is: ', u'RB')
('child is: ', u'real')
(JJ real)
('*************Node label is: ', u'JJ')
('child is: ', u'tonight')
(NN tonight)
('*************Node label is: ', u'NN')
('child is: ', Tree('NP', [Tree('PRP', ['it'])]))
('child is: ', Tree('VP', [Tree('VBZ', ['feels']), Tree('PP', [Tree('IN', ['like']), Tree('NP', [Tree('NNS', ['trumps'])])])]))
(S (NP (PRP it)) (VP (VBZ feels) (PP (IN like) (NP (NNS trumps)))))
('*************Node label is: ', u'S')
___________I am here
('*************subchild_labels are: ', [u'PRP'])
('child is: ', u'real')
(JJ real)
('*************Node label is: ', u'JJ')
('child is: ', u'talk')
(NN talk)
('*************Node label is: ', u'NN')
('child is: ', Tree('PRP', ['it']))
(NP (PRP it))
('*************Node label is: ', u'NP')
('child is: ', Tree('VBZ', ['feels']))
('child is: ', Tree('PP', [Tree('IN', ['like']), Tree('NP', [Tree('NNS', ['trumps'])])]))
(VP (VBZ feels) (PP (IN like) (NP (NNS trumps))))
('*************Node label is: ', u'VP')
('child is: ', u'it')
(PRP it)
('*************Node label is: ', u'PRP')
('child is: ', u'feels')
(VBZ feels)
('*************Node label is: ', u'VBZ')
('child is: ', Tree('IN', ['like']))
('child is: ', Tree('NP', [Tree('NNS', ['trumps'])]))
(PP (IN like) (NP (NNS trumps)))
('*************Node label is: ', u'PP')
('child is: ', u'like')
(IN like)
('*************Node label is: ', u'IN')
('child is: ', Tree('NNS', ['trumps']))
(NP (NNS trumps))
('*************Node label is: ', u'NP')
('child is: ', u'trumps')
(NNS trumps)
('*************Node label is: ', u'NNS')
('context: ', [])
[[]]
Done!
2018-04-21 16:59:55.355612: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2018-04-21 16:59:55.355646: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2018-04-21 16:59:55.355656: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2018-04-21 16:59:55.355677: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2018-04-21 16:59:55.355685: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
{}
Can you please share the checkpoints for bidirectional LSTM?
[jalal@goku entity-sentiment-analysis]$ python parse_doc.py
Traceback (most recent call last):
File "parse_doc.py", line 181, in <module>
m= get_sentiment(text, network)
NameError: name 'text' is not defined
[jalal@goku entity-sentiment-analysis]$ vi main.py
[jalal@goku entity-sentiment-analysis]$ vi parse_doc.py
[jalal@goku entity-sentiment-analysis]$ python parse_doc.py
Parsing Document...
Tokenizing sentences...
Done!
Anaphora resolution for sentence: Mona is a good girl, Mina is a fantastic mom
Done!
Named Entity Clustering:
Mona is a good girl , Mina is a fantastic mom
Mina is a fantastic mom
Done!
2018-04-19 20:30:46.221636: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2018-04-19 20:30:46.221678: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2018-04-19 20:30:46.221725: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2018-04-19 20:30:46.221736: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2018-04-19 20:30:46.221747: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Loading model /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm...
2018-04-19 20:30:46.260149: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.260703: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.260857: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.261428: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.262068: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.262486: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.262990: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.263635: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.263907: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.264407: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.264878: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.265591: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.265858: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.266291: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.266862: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.267117: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.267434: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.267968: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.268255: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.268480: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.269303: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.269404: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.269884: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
2018-04-19 20:30:46.270019: W tensorflow/core/framework/op_kernel.cc:1152] Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
Traceback (most recent call last):
File "parse_doc.py", line 181, in <module>
m= get_sentiment(text, network)
File "parse_doc.py", line 158, in get_sentiment
predictions = network.predict_sentences(sentences)
File "/scratch2/debate_tweets/sentiment/CharLSTM/lib_model/bidirectional_lstm.py", line 287, in predict_sentences
saver.restore(sess, SAVE_PATH)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1457, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 778, in run
run_metadata_ptr)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 982, in _run
feed_dict_string, options, run_metadata)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1032, in _do_run
target_list, options, run_metadata)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1052, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
[[Node: save/RestoreV2_11 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_11/tensor_names, save/RestoreV2_11/shape_and_slices)]]
Caused by op u'save/RestoreV2_11', defined at:
File "parse_doc.py", line 181, in <module>
m= get_sentiment(text, network)
File "parse_doc.py", line 158, in get_sentiment
predictions = network.predict_sentences(sentences)
File "/scratch2/debate_tweets/sentiment/CharLSTM/lib_model/bidirectional_lstm.py", line 283, in predict_sentences
saver = tf.train.Saver()
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1056, in __init__
self.build()
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1086, in build
restore_sequentially=self._restore_sequentially)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 691, in build
restore_sequentially, reshape)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 407, in _AddRestoreOps
tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 247, in restore_op
[spec.tensor.dtype])[0])
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py", line 669, in restore_v2
dtypes=dtypes, name=name)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 768, in apply_op
op_def=op_def)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2336, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/scratch/sjn-p2/anaconda/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1228, in __init__
self._traceback = _extract_stack()
NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /scratch2/debate_tweets/sentiment/CharLSTM/checkpoints/bidirectional_lstm
[[Node: save/RestoreV2_11 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_11/tensor_names, save/RestoreV2_11/shape_and_slices)]]
[jalal@goku entity-sentiment-analysis]$
Hey Charles!
I tried this script and I get the following error:
Traceback (most recent call last):
File "/private/tmp/DeepLearning/parse_doc.py", line 175, in <module>
get_sentiment(text, network)
File "/private/tmp/DeepLearning/parse_doc.py", line 154, in get_sentiment
contexts = parse_doc(document)
File "/private/tmp/DeepLearning/parse_doc.py", line 127, in parse_doc
tree = parse_sentence(coreference_resolution(sentence))
File "/private/tmp/DeepLearning/parse_doc.py", line 57, in coreference_resolution
coreferences = output['corefs']
TypeError: string indices must be integers
Process finished with exit code 1
I have pycorenlp==0.3.0
(don't know if that's the one you used) and running the same StanfordNLP as you (http://nlp.stanford.edu/software/stanford-corenlp-full-2016-10-31.zip) on Java 9.0.1
And here's what I get from StanfordNLP:
[pool-1-thread-1] INFO CoreNLP - [/0:0:0:0:0:0:0:1:50375] API call w/annotators tokenize,ssplit,pos,lemma,ner,depparse,mention,coref
Jean is really sad, but Adam is the happiest guy ever
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator lemma
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ner
[pool-1-thread-1] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... done [2.0 sec].
[pool-1-thread-1] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz ... done [0.8 sec].
[pool-1-thread-1] INFO edu.stanford.nlp.ie.AbstractSequenceClassifier - Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... done [1.3 sec].
[pool-1-thread-1] INFO edu.stanford.nlp.time.JollyDayHolidays - Initializing JollyDayHoliday for SUTime from classpath edu/stanford/nlp/models/sutime/jollyday/Holidays_sutime.xml as sutime.binder.1.
edu.stanford.nlp.util.ReflectionLoading$ReflectionLoadingException: Error creating edu.stanford.nlp.time.TimeExpressionExtractorImpl
at edu.stanford.nlp.util.ReflectionLoading.loadByReflection(ReflectionLoading.java:40)
at edu.stanford.nlp.time.TimeExpressionExtractorFactory.create(TimeExpressionExtractorFactory.java:57)
at edu.stanford.nlp.time.TimeExpressionExtractorFactory.createExtractor(TimeExpressionExtractorFactory.java:38)
at edu.stanford.nlp.ie.regexp.NumberSequenceClassifier.<init>(NumberSequenceClassifier.java:86)
at edu.stanford.nlp.ie.NERClassifierCombiner.<init>(NERClassifierCombiner.java:136)
at edu.stanford.nlp.pipeline.AnnotatorImplementations.ner(AnnotatorImplementations.java:121)
at edu.stanford.nlp.pipeline.AnnotatorFactories$6.create(AnnotatorFactories.java:273)
at edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:152)
...and a bunch more lines
Is it a problem with JollyDayHoliday
? What do you think I could change to make it work?
Disclaimer: sorry but I don't have any experience with StanfordNLP
As mentioned in your blog. Adam is happy, Jean is sad yields good results.
I ran the following example:
"Jean and Adam are really sad, but Sam is the happiest guy ever"
and the results are:
Entity: Jean Adam -- sentiment: 0.05895272
Entity: Sam -- sentiment: 0.95025355
Should it not separate out Jean and Adam?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.