attardi/deepnl

Error using dl-sentwords.py with SENNA

draperunner opened this issue · 0 comments

When I run

bin/dl-sentiwords.py tweets.txt --vocab vocab.txt --vectors vectors.txt --vocab-size 10 --textField 0 --tagField 1 --variant senna -v

I get this response:

Generated 13 feature vectors with 50 features each.
Saving vocabulary in vocab.txt
Creating new network...
Exception TypeError: 'an integer is required' in 'deepnl.extractors.Extractor.get_padding_left' ignored
Exception TypeError: 'an integer is required' in 'deepnl.extractors.Extractor.get_padding_right' ignored
... with the following parameters:

        Input layer size: 550
        Hidden layer size: 200
        Output size: 2
        
Starting training
Hello <deepnl.extractors.ConvertGenerator object at 0x7f0ea0cbe780> 100 2
Traceback (most recent call last):
  File "bin/dl-sentiwords.py", line 218, in <module>
    args.iterations, report_intervals)
  File "deepnl/sentiwords.pyx", line 266, in deepnl.sentiwords.SentimentTrainer.train (deepnl/sentiwords.cpp:6262)
    cdef float_t all_cases = float(sum([len(sen) for sen in sentences]) * epochs * self.ngram_size)
  File "deepnl/extractors.pyx", line 67, in __iter__ (deepnl/extractors.cpp:3470)
    c =  self.converter.convert(s)
  File "deepnl/extractors.pyx", line 133, in deepnl.extractors.Converter.convert (deepnl/extractors.cpp:4590)
    return INT(zip(*[(<Extractor>e).extract(sent, field) for e, field in zip(self.extractors, self.fields)]))
TypeError: long() argument must be a string or a number, not 'NoneType'

Where vocab.txt and vectors.txt are non-existing files, and tweets.txt looks like this:

HERE today, gone tomorrow- but still here! A short note on Nokia's patent deals with @Microsoft and @Alcatel_Lucent  http://t.co/y5wFgUygFD	neutral
@joebelfiore @GabeAul @Microsoft @Lumia @satyanadella plz add L1520 in the 1st wave of windows10 phones release.plz dont hurt ur diehardfans	neutral
If I make a game as a #windows10 Universal App. Will #xboxone owners be able to download and play it in November? @majornelson @Microsoft	neutral
@tomwarren @microsoft the lumia cityman looks terrible and its blue not Cyan?! Buttons may be too small. #Lumia 730/735 has a superior look.	negative
@microsoft using Office 2013's Bing dictionary. type in "bound." This is the 3rd picture they show me. WTF?... http://t.co/VzwGIoLxco	negative
@Microsoft - congratulations on the 20th Birth Anniversary of @Windows 95.  20 years since we've come to love you (&amp; backward compatibility)	positive
http://t.co/luX5VvBrmJ   Register 4 the NACR Skype for Business event with @Microsoft for Sept 16th Chevy Chase, MD #skype4B #contactcenter	positive
@vukosi @Microsoft Please have a look at this link and see if the errors mentioned may correspond to your errors. http://t.co/9Tj4Nhkoyo	neutral
Predictive Analytics with @Microsoft #Azure #MachineLearning 2nd ed. Now available. http://t.co/frOUbXXOzU @MSAdvAnalytics	neutral
@microsoft ur company will give me my 500 pounds plus the cost of the laptop on Monday for what u did to my laptop!	negative

Using the word2vec variant runs fine. Any idea what's wrong?