<div dir="ltr"><div><div><div><div><div><div><div><div>Hi<br><br></div>I have managed to compile and integrate PET to our system, but in a way that has several deficiencies, and I want to fix these. I understand from Dan Flickinger that the way I am calling PET is incorrect.<br>
<br></div>My goals are to:<br>  1) extract both the parse tree and the MRS for a sentence<br>  2) relate the information between the two (ie which part of the parse tree led to the creation of a particular MRS<br></div>  3) run this all as a long running web service (ie I do not want to start up the loading of the grammar for every sentence)<br>
<br></div>My partial solution is <br>  A) to build a process (call this P) that offers a web service interface to allow requests to parse sentences and to return the results<br>  B) at start time the process P creates a PET process and communicates via shared streams (the command is cheap -mrs -verbose=3 -nsolutions english)</div>
  C) when a sentence comes in to process P, then it is routed to PET, and the (verbose output) is &quot;scraped&quot; to extract the information (effectively by parsing the text)<br></div>  D) process P then does some transformations and outputs the result<br>
<br></div>This does achieve my goals, apart from (2), as there is no span information in the MRS output. However it is not elegant and I have had to modify the PET code to tell process P when it is done on a sentence. There must be a better way :)<br>
<br></div>I have tried using the -server parameter, but no port seems to be opened on the Linux system, and I do not know what the API does.<br><div><br></div><div>Please could you tell me if this is possible by just calling PET with the right parameters (and if so, what are these parameters, and how the PET server is called). I dont much care what the format of the output is (XML, text whatever).<br>
<br></div><div>Thank you<br><br></div><div>David Mott<br></div><div>IBM, UK<br></div></div>