Problem Dependency Parser StanfordParser

3 views
Skip to first unread message

Yassin TOULLICHI

unread,
Aug 30, 2019, 11:30:49 AM8/30/19
to dkpro-core-user
Hi,

I have some problem to use stanfordParser in french language, de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency result is null and the result of token.getParent is not correct

The config of my pipeline is :  BreakIteratorSegmenter, SnowballStemmer,TreeTaggerPosTagger and StanfordParser

example  for "comment effectuer un retrait"

for (Token token : JCasUtil.selectCovered(jcas, Token.class, sentence)) {
System.out.format("%-10s [%s]%n", token.getCoveredText(), token.getParent().getCoveredText());
}

the result : 
 token.getCoveredText() [ token.getParent().getCoveredText()]
comment    [comment effectuer un retrait]
effectuer  [comment effectuer un retrait]
un         [un]
retrait    [comment effectuer un retrait]

pom : 

<dependency>
<groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
<artifactId>de.tudarmstadt.ukp.dkpro.core.stanfordnlp-gpl</artifactId>
<version>1.10.0</version> </dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
<artifactId>de.tudarmstadt.ukp.dkpro.core.stanfordnlp-model-parser-fr-factored</artifactId>
<version>20150129.1</version>
</dependency>

Can you help me to use a dependency parser for french, i used also MaltParser but he didn't work well,?

Best Regards
Yassin



Torsten Zesch

unread,
Sep 2, 2019, 2:34:25 PM9/2/19
to dkpro-c...@googlegroups.com
I just tried here with a minimal setup of BreatIteratorSegmenter and StanfordParser and the parser model for your pom.
Works for me and gives this result below for your text example.

In order to debug this further:
- can you try to noly run segmenter and parser
- do you have any competing version of Stanford in your classpath?
- any error messages on the console?

-Torsten

Token
sofa: _InitialView
begin: 0
end: 7
parent: VP
sofa: _InitialView
begin: 0
end: 28
constituentType: "VPinf"
parent: S
sofa: _InitialView
begin: 0
end: 28
constituentType: "SENT"
parent: ROOT
sofa: _InitialView
begin: 0
end: 28
constituentType: "ROOT"
parent: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
lemma: <null>
stem: <null>
pos: <null>
morph: <null>
id: <null>
form: <null>
syntacticFunction: <null>

Token
sofa: _InitialView
begin: 8
end: 17
parent: VP
sofa: _InitialView
begin: 8
end: 17
constituentType: "VN"
parent: VP
sofa: _InitialView
begin: 0
end: 28
constituentType: "VPinf"
parent: S
sofa: _InitialView
begin: 0
end: 28
constituentType: "SENT"
parent: ROOT
sofa: _InitialView
begin: 0
end: 28
constituentType: "ROOT"
parent: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
lemma: <null>
stem: <null>
pos: <null>
morph: <null>
id: <null>
form: <null>
syntacticFunction: <null>

Token
sofa: _InitialView
begin: 18
end: 20
parent: NP
sofa: _InitialView
begin: 18
end: 28
constituentType: "NP"
parent: VP
sofa: _InitialView
begin: 0
end: 28
constituentType: "VPinf"
parent: S
sofa: _InitialView
begin: 0
end: 28
constituentType: "SENT"
parent: ROOT
sofa: _InitialView
begin: 0
end: 28
constituentType: "ROOT"
parent: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
lemma: <null>
stem: <null>
pos: <null>
morph: <null>
id: <null>
form: <null>
syntacticFunction: <null>

Token
sofa: _InitialView
begin: 21
end: 28
parent: NP
sofa: _InitialView
begin: 18
end: 28
constituentType: "NP"
parent: VP
sofa: _InitialView
begin: 0
end: 28
constituentType: "VPinf"
parent: S
sofa: _InitialView
begin: 0
end: 28
constituentType: "SENT"
parent: ROOT
sofa: _InitialView
begin: 0
end: 28
constituentType: "ROOT"
parent: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
children: FSArray
syntacticFunction: <null>
lemma: <null>
stem: <null>
pos: <null>
morph: <null>
id: <null>
form: <null>
syntacticFunction: <null>
--
You received this message because you are subscribed to the Google Groups "dkpro-core-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dkpro-core-us...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dkpro-core-user/c810cfba-353a-4c96-8f95-3913c5e177c8%40googlegroups.com <https://groups.google.com/d/msgid/dkpro-core-user/c810cfba-353a-4c96-8f95-3913c5e177c8%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages