Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in negex.py when negPossible flag is set to True #5

Open
GoogleCodeExporter opened this issue Apr 13, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. edit wrapper.py testing script on line 16 to set negP=True
2. run wrapper.py

What is the expected output? What do you see instead?
Expected output is negex_output.txt file with entries annotate as "possible" 
"affirmed" or "negated"
Instead, receive error message below:
Traceback (most recent call last):
  File "wrapper.py", line 30, in <module>
    if __name__ == '__main__': main()
  File "wrapper.py", line 16, in main
    tagger = negTagger(sentence = report[2], phrases = [report[1]], rules = irules) #, negP=False)
  File "/Users/grundmeier/svn/negex-read-only/negex.python/negex.py", line 155, in __init__
    sb3 = sb3 + ' ' + sentenceTokens[i]
TypeError: can only concatenate list (not "str") to list

What version of the product are you using? On what operating system?
using revision 170 on Mac OSX 1.6.8 with python 2.6.1

Please provide any additional information below.
Here is the edit I made locally to correct the problem.  I hope it helps!
===================================================================
--- negex.python/negex.py   (revision 170)
+++ negex.python/negex.py   (working copy)
@@ -152,7 +152,7 @@
                     sentenceTokens[i] = sentenceTokens[i].replace('[PHRASE]', '[POSSIBLE]')
                     sentencePortion = sentencePortion + ' ' + sentenceTokens[i]

-                sb3 = sb3 + ' ' + sentenceTokens[i]
+                sb3.append(sentenceTokens[i])

             if sentencePortion.strip():
                 aScopes.append(sentencePortion.strip())



Original issue reported on code.google.com by [email protected] on 19 Aug 2013 at 1:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant