2016-08-09 18 views
0

Ich benutze parsey mcparseface und Syntaxnet, um etwas Text zu analysieren. Ich möchte die Positionsdaten von Wörtern zusammen mit dem Syntaxbaum extrahieren.Parsey mcparseface: wie man Position des Wortes im Satz zusammen mit Parsebaum erhält

Zeit, was die Ausgabe ist:

echo 'Alice brought the pizza to Alice.' | syntaxnet/demo.sh 

Input: Alice brought the pizza to Alice . 
Parse: 
brought VBD ROOT 
+-- ALice NNP nsubj 
+-- pizza NN dobj 
| +-- the DT det 
+-- to IN prep 
| +-- Alice NNP pobj 
+-- . . punct 

, wie ich es brauchen

Input: Alice brought the pizza to Alice . 
Parse: 
brought VBD ROOT 2 
+-- Alice NNP nsubj 1 
+-- pizza NN dobj 4 
| +-- the DT det 3 
+-- to IN prep 5 
| +-- Alice NNP pobj 6 
+-- . . punct 7 

oder ähnlich. (Dies ist besonders nützlich, wenn es viele Vorkommen von demselben Wort sind.)

Danke

Antwort