info-gnuprologjava
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-gnuprologjava] Problems with loading prolog-file (ensureLoaded


From: Daniel Thomas
Subject: Re: [Info-gnuprologjava] Problems with loading prolog-file (ensureLoaded); falling into recursion?
Date: Tue, 21 Jan 2014 09:25:07 +0000

Hello Tim,

This sounds like a known problem with the parser where if it hits
certain kinds of syntax error then it will go into an infinite loop.
Rishabh Garg fixed this problem over the summer but I haven't got around
to rolling out an update containing it yet. Perhaps he can help you with
a snapshot build - I won't have time to roll out an update until late
April at the earliest. In the meantime the easiest solution is probably
to work out what syntax error is causing it to loop - unfortunately any
non-ascii character counts as a 'syntax error' for this purpose -
Rishabh has fixed this in the latest code.

Daniel

On Mon, 2014-01-20 at 18:45 +0100, Tim Hemig wrote:
> Hi There!
> 
> I want to load previously generated knowledge bases into the Environment. 
> There is one general file, and after that I include different rulesets 
> depending on what I find in the first import. Background is the following:
> I want to load annotated text into prolog, and use it for textmining and 
> further automated annotating. An example ruleset with a typical parent and 
> grandparent relation does load, and I can consult it, so I think the 
> mechanics are valid, I guess.
> My problem-file is just a file full of facts about the different tiers of my 
> annotated text, read from an XML file before (Exmaralda-file if interested).
> 
> But as soon as I import the generated code my java process does not come back 
> from the call to environment.ensureLoaded(AtomicTerm.get("filename"));
> 
> The only difference between the two test files I use (one gets loaded, the 
> other not) is that the negative one does enclose every Atom with ' around it. 
> in the positive file I only use lower case words.
> 
> Are there known reasons for not returning from this call? I do not believe 
> there is some endless recursion to blame, since I only want to parse facts. I 
> also cannot work with error messages since there are none to find. the 
> java-processes continue to use a good amount of system- and user-cpu-time 
> until the process is killed.
> 
> Open for any suggestion, and pleas do not hesitate to request more specific 
> information, if the situation is unclear.
> Thank you in advance and best regards,
>   Tim Hemig
> 
> PS: A short example of the doc/3 predicate. doc(X,Y,Z) reads "document has 
> the token Z at index Y in tier/level X":
> 
> doc('TXT','0','Kirchenaustritt').
> doc('TXT','1','Ein').
> doc('TXT','2','selbstbestimmter').
> doc('TXT','3','Kirchenaustritt').
> doc('TXT','4','ist').
> doc('TXT','5','nach').
> doc('TXT','6','Vorstellung').
> doc('TXT','7','der').
> doc('TXT','8','Kirchen').
> doc('TXT','9','nicht').
> doc('TXT','10','wirksam;').
> 

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]