Syntaxnet Analysis
I was testing few examples using syntaxnet: Input: Kohli is playing cricket against Bangladesh in Bangladesh at stadium. Output: playing VBG ROOT +-- Kohli NNP nsubj +-- is VBZ aux +-- cricket NN dobj +-- against IN prep | +-- Bangladesh NNP pobj +-- in IN prep | +-- Bangladesh NNP pobj +-- at IN prep +-- stadium NN pobj
Here it is clear that everything is centric to playing. But, I want every thing to be some how related to kohli. UseCase: When typing any query in the search box that starts with kohli, I want it to suggest me relevant possible combinations with that.
The ROOT definition of 'playing' is actually correct and 'Kohli' correctly linked as the 'nsubj' of the ROOT 'playing'.
@borisstock That's correct, I am not denying the fact. But, it is not suitable for my usecase. So, is there any way by which we can tweak any parameter to get the parse tree with nsubj (Here, Kohli) as the root and rest of the nodes some how related to it.
Thanks
No, there is no way to change the representation in the way you desire, because it is not syntactic. You would have to write your own post-processing code to do that.