se.lth.cs.srl.languages.Chinese Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of srl Show documentation
Show all versions of srl Show documentation
mate-tools Semantic Role Labeler
The newest version!
package se.lth.cs.srl.languages;
import is2.lemmatizer.Lemmatizer;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import java.util.regex.Pattern;
import se.lth.cs.srl.corpus.Predicate;
import se.lth.cs.srl.corpus.Sentence;
import se.lth.cs.srl.corpus.Word;
import se.lth.cs.srl.options.FullPipelineOptions;
import se.lth.cs.srl.preprocessor.SimpleChineseLemmatizer;
import se.lth.cs.srl.preprocessor.tokenization.StanfordChineseSegmenterWrapper;
import se.lth.cs.srl.preprocessor.tokenization.Tokenizer;
import se.lth.cs.srl.util.FileExistenceVerifier;
public class Chinese extends Language {
private static Pattern CALSPattern=Pattern.compile("^A0|A1|A2|A3|A4$");
@Override
public String getCoreArgumentLabelSequence(Predicate pred,Map proposition) {
Sentence sen=pred.getMySentence();
StringBuilder ret=new StringBuilder();
for(int i=1,size=sen.size();i