gate

Parse XML Self-Closing Tags with Text

无人久伴 提交于 2021-01-28 10:53:48
问题 Hey everyone I am trying to parse this part of an XML file I have. The problem I am encountering is that the text contains a lot of self-closing tags. I can't remove those tags because they are providing me with some indexing detail. How can I get access to the text without all the "Node" tags? <TextWithNodes> <Node id="0"/>A TEENAGER <Node id="11"/>yesterday<Node id="20"/> accused his parents of cruelty by feeding him a daily diet of chips which sent his weight ballooning to 22st at the age

Parse GATE Document to get Co-Reference Text

拈花ヽ惹草 提交于 2020-01-13 06:04:28
问题 I'm creating a GATE app which used to find co-reference text. It works fine and I have created zipped file of the app by export option provided in GATE. Now I'm trying to use the same in my Java code. Gate.runInSandbox(true); Gate.setGateHome(new File(gateHome)); Gate.setPluginsHome(new File(gateHome, "plugins")); Gate.init(); URL applicationURL = new URL("file:" + new Path(gateHome, "application.xgapp").toString()); application = (CorpusController) PersistenceManager.loadObjectFromUrl

Parse GATE Document to get Co-Reference Text

我们两清 提交于 2020-01-13 06:04:09
问题 I'm creating a GATE app which used to find co-reference text. It works fine and I have created zipped file of the app by export option provided in GATE. Now I'm trying to use the same in my Java code. Gate.runInSandbox(true); Gate.setGateHome(new File(gateHome)); Gate.setPluginsHome(new File(gateHome, "plugins")); Gate.init(); URL applicationURL = new URL("file:" + new Path(gateHome, "application.xgapp").toString()); application = (CorpusController) PersistenceManager.loadObjectFromUrl

GATE PersistenceManager.loadObjectFromFile outofmemory error while loading .gapp files

让人想犯罪 __ 提交于 2019-12-25 16:37:38
问题 While loading .gapp files from disc using PersistenceManager.loadObjectFromFile I got the, "Exception in thread "main" java.lang.OutOfMemoryError: Java heap space" Error. I increased the heap size to a maximum of 2048M and got the issue fixed. Is there a better alternative way to solve this issue when loading a large set of .gapp files. 回答1: I think not, if you are using the default garbage collector. It needs the max heap size parameter for its work. Note that the memory is really needed.

Parsing either font style or block of paragraph in GATE

半腔热情 提交于 2019-12-24 12:47:13
问题 I have a word document. I need to match particular table section or heading section of it using GATE. I thought if there were any steps from where we can first check any font size or font style of the heading and then match rest of the content till next heading pattern repeats. 回答1: GATE has only a limited support for MS Word documents provided by the Apache Tika and Apache POI libraries. I do not know about any free alternative... We have developed our own plugin ( gate.DocumentFormat ) for

Concept of Space Token in JAPE

雨燕双飞 提交于 2019-12-24 00:58:58
问题 I am trying out a JAPE snippet and trying to understand the concept of Space Token. Phase: Apple Input: Token SpaceToken Lookup Options: control = appelt Rule: Country ( {Token.string == "President"} {SpaceToken} {Lookup.majorType==location} ):impPersons This JAPE is annotating President USA, President India but not PresidentIndia or PresidentUSA. This annotation remains same if I remove Space Token from Input and LHS in the above code. Then if with Space Token without Space Token both

JAPE rule Sentence contains multiple cases

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 16:34:41
问题 How can i check whether a sentence contain combinations? For example consider sentence. John appointed as new CEO for google. I need to write a rule to check whether sentence contains < 'new' + 'Jobtitle' >. How can i achieve this. I tried following. I need to check is there 'new' before word . Rule: CustomRules ( { Sentence contains {Lookup.majorType == "organization"}, Sentence contains {Lookup.majorType == "jobtitle"}, Sentence contains {Lookup.majorType == "person_first"} } ) 回答1: One way

Run GATE pipeline from inside a Java program without the GUI. build a tomcat app with gate

我只是一个虾纸丫 提交于 2019-12-20 10:55:40
问题 i have built some plugin components to GATE and in combination with ANNIE tools, im running a pipeline in GATE platform. Does anyone know how can i run a pipeline from the console? I want to build a web application in Tomcat that will be taking a plain text from the web page, passing it to the GATE pipeline i have built and do something. So i need to run GATE in a simple Java file, how can it be done? Thanks in advance and sorry for my poor grammar 回答1: The GATE example code shows you how to

Jape file to find the pattern within a sentence

人走茶凉 提交于 2019-12-19 09:26:32
问题 I need to annotate a part of a sentence if the words i have written in my jape rule appear in the same sentence. Eg the sentence is "The child cannot resist any changes to his routine". I have put words like resist in "trouble.lst" file and changes in "alteration.lst" file. Now in this sentence i need to annotate the part "resist any changes" as "A3b". I have tried using the below code but it is not considering words in the same sentence. My jape rule is taking words from different sentences

GATE SUMMA configuration

牧云@^-^@ 提交于 2019-12-13 17:23:59
问题 I am trying to use the GATE SUMMA from the java. I am trying to run the files included in the tutorial. I have downloaded both ANNIE and SUMMA plugins seperately. What I dont understand is this part in the configuration. Gate.init(); // you have to register the plugins from GATE you want to use Gate.getCreoleRegister().addDirectory(new URL("file:///"+anniePluginDir)); // you have to register the SUMMA plugin to have access to its resources Gate.getCreoleRegister().addDirectory(new URL("file:/