Giter Site home page Giter Site logo

Comments (28)

DeanLee77 avatar DeanLee77 commented on August 25, 2024

can you send me a rule set you used in the server? it seems that there was an issue with rules.

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

I am using Testing for ALL Node Lines and features.txt from https://github.com/DeanLee77/Nadia/tree/master/bin/testingPackage/testing10.
It works fine on the localhost on my machine but when I run it on a remote machine, it causes the issue. It reads the rule correctly. I've tested printing parentText in the method
` @OverRide
public void handleParent(String parentText, int lineNumber) {

	Node data = nodeSet.getNodeMap().get(parentText);
	System.out.println("parentText "+ parentText);

`
It gives the same output on both local and remote machine

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

There's a difference in the output of the above method on both local and remote machines.
Local Machine produces indexOfRuleToBeAsked : 1 after the ouput of System.out.println("parentText "+ parentText); ends but remote machine doesn't print it.

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

it is .RuleSetParser.handleChild(RuleSetParser.java:347) issue in com.NadiaRS/InferenceEngine/ruleParser
it might be a reason that Node object was not created or there was no NodeSet object created. but still it does NOT make sense to me. can you put a log to print 'data' instance of Node class or NodeSet instance named nodeSet?

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

datanull datanull datanull datanull datanull datanull datanull datanull datanull datanull datanull datanull datacom.NadiaRS.InferenceEngine.nodePackage.ValueConclusionLine@2d8f9195 datanull datanull datanull datanull datanull datacom.NadiaRS.InferenceEngine.nodePackage.ValueConclusionLine@46a20799 datacom.NadiaRS.InferenceEngine.nodePackage.ValueConclusionLine@5a90b0b2 datacom.NadiaRS.InferenceEngine.nodePackage.ValueConclusionLine@1ade2363 datacom.NadiaRS.InferenceEngine.nodePackage.ValueConclusionLine@135c5d6e
While printing node object from
Node data = nodeSet.getNodeMap().get(parentText);, it gives the above output

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

for nodeSet object, when I run System.out.println("nodeSet ",nodeSet);
nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee nodeset com.NadiaRS.InferenceEngine.nodePackage.NodeSet@51bb83ee

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

it seems that you printed Node object in a 'handleParent(String parentText, int lineNumber)'.
Can you put ' System.out.println("line number: " + lineNumber); System.out.println("data : "+data.getNodeName()); ' at line:345 in RuleSetParser class, which is inside of 'handleChild()' method?

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

output.txt
Here is the output. It doesn't print line 118 to 120 which I am getting on my local machine

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

hum... I have looked at the output file, and was wondering if the NADIA crushed after attempt to read line 118 of the rule file or not.
I found that it only printed upto line 117 even there is a number of lines after that, and strangely a line number of 118 should be printed if there was an issue on parsing the line but the line number was not printed.

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

Yeah. Some issue occurs after 117 and it crashes. I've tested other files as well but when the last 3 or 4 lines are left, it throws the exception. On the local machine, it doesn't behave like that

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

I cloned the repository to a new folder. and started it again. It is working fine this time. I don't know what was the issue behind it

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

Glad to hear that it is working now. sometimes Java works funny. Anyhow, when you need help, let me know. by the way, what is the entire project about, may I ask?

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

I tried running https://github.com/DeanLee77/Nadia/tree/master/bin/testingPackage/testing10 but it throws the same error. For https://github.com/DeanLee77/Nadia/blob/master/bin/testingPackage/testing2/Wedding%20Planner.txt
this test, it is working fine on the remote machine. I don't know what might be causing the issue.

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

They are working on deploying a system that works like your application. I didn't ask for many details. The UI for this app is kinda difficult for a user.

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

so the application in the server does NOT work for a file, https://github.com/DeanLee77/Nadia/blob/master/bin/testingPackage/testing10/Testing for ALL Node Lines and features.txt?

but works with the file, 'https://github.com/DeanLee77/Nadia/blob/master/bin/testingPackage/testing2/Wedding Planner.txt '.

Do I understand correctly?

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

Yeah. That's right. I am now testing for other files as well and will let you know the result

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

It causes the issues with the server on test 6,7,8 and 10. With rest of the files, it is working fine

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

I Kind of have an idea what caused the error. the text file you tested contains a symbolic quotation mark at line: 118(“Steam force”), 11(“Australian”), 11(“Australian”), 10(“Australian”) of 10, 8, 7, 6 files respectively. Even though, handing such symbolic quotation mark has been handled during regex of Tokenizer class, it seems that the regex works funny in your environment.

Anyhow, I believe once you changed the symbolic quotation mark from ( “ ” ) to ( " " ) then it will work. If it does not then need to put another log where appropriate.

Please let me know how it goes.

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

Yeah. It was exactly the same issue. I wonder why it was doing so. I've noticed one thing which is if I save the file with (“ ”) and then retrieve it from the database, the sign “ ” is replaced with ? ?. Here is the retrieved value for test 6 and same happens for test 10.

FIXED name list AS LIST
	ITEM John Smith
	ITEM Dean Tudir
	ITEM Agness Huge
	ITEM Sugar Sweet
	ITEM Tim Armond
	ITEM Lolly T.Sweet
INPUT person's dob AS DATE
	//this line contained “Australian“ and is now in this format after retriving from the database
person's nationality IS ?Australian?
	AND citizenship testing of person's parents
		OR one of person's parents is Australian
		OR both of person's parents are Australian
		OR MANDATORY all grand parents of the person were Australian
	AND the person was born in Australia
	AND we have person's name and dob
		AND KNOWN person's name
		AND KNOWN person's dob  
	AND we have the person's passport
	AND person's name IS IN LIST: name list
	AND person made it to Las Vegas
		AND NOT the person missed the flight  	

Maybe the database doesn't accept those characters and change it to some unknown value

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

which database are you currently using?

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

I am using PostgreSQL. The version is from 12.x series.

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

There's another thing which I just tested. I wrote final Pattern a=Pattern.compile("\""); and tested both “ and " and the result is different for both characters. It accepts " but doesn't accept “. The regex written in the code doesn't support “ as well. I've tested it on all of those but all returned false.

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

I would try to use double quotation mark in ascii or unicode, and avoid the symbolic mark from MS word.

In addition, regex to handle the mark in Tokenizer class is ' Pattern quotedPattern = Pattern.compile("^(["\“])(.)(["\”])(\.)");'

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

further more, it is not about regex at this point of time, the quotation mark is translated into something else in the database. I believe that the mistranslation is what caused the issue.

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

It would be great if you update that. The regex you just mentioned produces a syntax error. I will try to update it.
Yeah, I am thinking the same as well. The database might not support that character on the remote system which I am currently working on.

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

if you look at the 'Tokenizer' class, the regex is already there.
And when I copied and pasted the pattern string it was printed like that in the github page. Please have a look at the class.

from nadiars.

jamshaid120 avatar jamshaid120 commented on August 25, 2024

Yeah. I Just tested it. The regex works fine. There might be a problem in the database or in that system. Thanks for guiding me with this.

from nadiars.

DeanLee77 avatar DeanLee77 commented on August 25, 2024

I am using Postgre 10.xxx version, and in my database the double quotation symbol, which is extracted from file 10, is translated as below.

AND service type = \342\200\234Steam force\342\200\235

this '\342\200\234' code can be found at a link : 'http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=8220&mode=decimal', and the value is in a row labelled as 'Octal UTF-8 bytes'

from nadiars.

Related Issues (2)

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.