Git Product home page Git Product logo

negex's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

negex's Issues

POST negation gives StringIndexOutOfBoundsException if endOffset < startOffset

What steps will reproduce the problem?
1. Try with input as the phrase "job" in a sentence like "Her job is ruled
out but clearly there is a requirement for her skills".
2. A StringInexOutOfBoundsException occurs in GenNegEx.java


What is the expected output? What do you see instead?
Expected output is the negation of the term "job" as follows:
"Her  [NEGATED]job[NEGATED] [POST]is ruled out[POST] [CONJ]but[CONJ]
clearly there is a requirement for her skills.  negated Her 
[NEGATED]job[NEGATED] [POST]is ruled out"

Got the StringIndexOutOfBoundsException:
java.lang.StringIndexOutOfBoundsException: String index out of range

At the following line in GenNegex.java:
sScope = sentence.substring(startOffset, endOffset);    

What version of the product are you using? On what operating system?
GeneralNegEx.java.v.1.2.05092009.zip

Please provide any additional information below.
Can be fixed by adding another if condition in GenNegEx.java as follows:
if(startOffset > endOffset){
    startOffset = sentence.lastIndexOf("[PSEU]");
}
PFA the modified GenNegEx.java file.

Original issue reported on code.google.com by [email protected] on 14 Apr 2010 at 8:24

Attachments:

how to use pyConTextNLP

What steps will reproduce the problem?
1.Try to use the function analyzeReport(report, targets, modifiers ) provided 
in the wiki page
2.Define report = "Cardiac examination demonstrated regular rate and rhythm, no 
murmur, rubs, or gallops.", modifiers = 
["DEFINITE_NEGATED_EXISTENCE","probable_existence"], targets = []
3.

What is the expected output? What do you see instead?
  File "C:\Documents and Settings\pyConTextNLP\pyConTextGraph\pyConTextGraph.py", line 293, in markItem
    if(not self.res.has_key(item.getLiteral()) ):
AttributeError: 'str' object has no attribute 'getLiteral'


What version of the product are you using? On what operating system?
pyConTextNLP-0.3.0
Windows XP

Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 22 Mar 2013 at 8:17

Attachments:

Misspelled words in negex triggers file

What steps will reproduce the problem?
1. Open the file negex_triggers.txt file with text editor
2. Search for "patinet" (misspelling of the word "patient")
3. It matches to lines 117, 120, 151

What is the expected output? What do you see instead?
N/A

What version of the product are you using? On what operating system?
N/A

Please provide any additional information below.
It is enough to replace all occurrences of "patinet" to "patient" in the 
negex_triggers.file

Original issue reported on code.google.com by [email protected] on 25 Nov 2014 at 9:26

Preprocessing input files

What steps will reproduce the problem?
When I try to run my notes for negation detection, I get this error message - 
Traceback (most recent call last):
  File "C:\Users....\Negex\wrapper.py", line 30, in <module>
    if __name__ == '__main__': main()
  File "C:\Users.... \Negex\wrapper.py", line 16, in main
    tagger = negTagger(sentence = report[2], phrases = [report[1]], rules = irules, negP=False)
IndexError: list index out of range
>>> 

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
General NegEx Python Implementation v.1.2
On Windows XP

Please provide any additional information below.
I processed the input file to match the demo input

Original issue reported on code.google.com by [email protected] on 5 Mar 2012 at 3:28

Passing in "paragraphs" to the GenNegEx can result in array out of bounds

I wasn't sure how else to contact developers for this project...

When inputting a paragraph instead of a sentence, certain paragraphs can
result in an ArrayOutOfBoundsException.  This results from multiple
identifications of various parts ([CONJ], [PREP], etc.) in different
sentences.  If the indexes passed to the substring() function when pulling
out the scope are inverted, the subtracted value is negative.

While this isn't a big issue, I have questions regarding the algorithm
overall.  What is the effect of passing in an entire paragraph as opposed
to a single sentence?

Original issue reported on code.google.com by [email protected] on 16 Jul 2009 at 7:17

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.