Search in sources :

Example 1 with ChineseSemanticHeadFinder

use of edu.stanford.nlp.trees.international.pennchinese.ChineseSemanticHeadFinder in project CoreNLP by stanfordnlp.

the class Preferences method lookupHeadFinder.

static HeadFinder lookupHeadFinder(String headfinderName) {
    if (headfinderName.equalsIgnoreCase("ArabicHeadFinder")) {
        return new ArabicHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("BikelChineseHeadFinder")) {
        return new BikelChineseHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("ChineseHeadFinder")) {
        return new ChineseHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("ChineseSemanticHeadFinder")) {
        return new ChineseSemanticHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("CollinsHeadFinder")) {
        return new CollinsHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("DybroFrenchHeadFinder")) {
        return new DybroFrenchHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("LeftHeadFinder")) {
        return new LeftHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("ModCollinsHeadFinder")) {
        return new ModCollinsHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("NegraHeadFinder")) {
        return new NegraHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("SemanticHeadFinder")) {
        return new SemanticHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("SunJurafskyChineseHeadFinder")) {
        return new SunJurafskyChineseHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("TueBaDZHeadFinder")) {
        return new TueBaDZHeadFinder();
    } else if (headfinderName.equalsIgnoreCase("UniversalSemanticHeadFinder")) {
        return new UniversalSemanticHeadFinder();
    } else {
        //try to find the class
        try {
            Class<?> headfinder = Class.forName(headfinderName);
            HeadFinder hf = (HeadFinder) headfinder.newInstance();
            return hf;
        } catch (Exception e) {
            return null;
        }
    }
}
Also used : ChineseSemanticHeadFinder(edu.stanford.nlp.trees.international.pennchinese.ChineseSemanticHeadFinder) ModCollinsHeadFinder(edu.stanford.nlp.trees.ModCollinsHeadFinder) BikelChineseHeadFinder(edu.stanford.nlp.trees.international.pennchinese.BikelChineseHeadFinder) ChineseHeadFinder(edu.stanford.nlp.trees.international.pennchinese.ChineseHeadFinder) SunJurafskyChineseHeadFinder(edu.stanford.nlp.trees.international.pennchinese.SunJurafskyChineseHeadFinder) DybroFrenchHeadFinder(edu.stanford.nlp.trees.international.french.DybroFrenchHeadFinder) LeftHeadFinder(edu.stanford.nlp.trees.LeftHeadFinder) TueBaDZHeadFinder(edu.stanford.nlp.trees.international.tuebadz.TueBaDZHeadFinder) ArabicHeadFinder(edu.stanford.nlp.trees.international.arabic.ArabicHeadFinder) NegraHeadFinder(edu.stanford.nlp.trees.international.negra.NegraHeadFinder) UniversalSemanticHeadFinder(edu.stanford.nlp.trees.UniversalSemanticHeadFinder) ChineseSemanticHeadFinder(edu.stanford.nlp.trees.international.pennchinese.ChineseSemanticHeadFinder) UniversalSemanticHeadFinder(edu.stanford.nlp.trees.UniversalSemanticHeadFinder) SemanticHeadFinder(edu.stanford.nlp.trees.SemanticHeadFinder) ChineseSemanticHeadFinder(edu.stanford.nlp.trees.international.pennchinese.ChineseSemanticHeadFinder) DybroFrenchHeadFinder(edu.stanford.nlp.trees.international.french.DybroFrenchHeadFinder) BikelChineseHeadFinder(edu.stanford.nlp.trees.international.pennchinese.BikelChineseHeadFinder) TueBaDZHeadFinder(edu.stanford.nlp.trees.international.tuebadz.TueBaDZHeadFinder) ChineseHeadFinder(edu.stanford.nlp.trees.international.pennchinese.ChineseHeadFinder) CollinsHeadFinder(edu.stanford.nlp.trees.CollinsHeadFinder) UniversalSemanticHeadFinder(edu.stanford.nlp.trees.UniversalSemanticHeadFinder) NegraHeadFinder(edu.stanford.nlp.trees.international.negra.NegraHeadFinder) ModCollinsHeadFinder(edu.stanford.nlp.trees.ModCollinsHeadFinder) SunJurafskyChineseHeadFinder(edu.stanford.nlp.trees.international.pennchinese.SunJurafskyChineseHeadFinder) HeadFinder(edu.stanford.nlp.trees.HeadFinder) LeftHeadFinder(edu.stanford.nlp.trees.LeftHeadFinder) SemanticHeadFinder(edu.stanford.nlp.trees.SemanticHeadFinder) ArabicHeadFinder(edu.stanford.nlp.trees.international.arabic.ArabicHeadFinder) CollinsHeadFinder(edu.stanford.nlp.trees.CollinsHeadFinder) ModCollinsHeadFinder(edu.stanford.nlp.trees.ModCollinsHeadFinder) SunJurafskyChineseHeadFinder(edu.stanford.nlp.trees.international.pennchinese.SunJurafskyChineseHeadFinder) BikelChineseHeadFinder(edu.stanford.nlp.trees.international.pennchinese.BikelChineseHeadFinder)

Aggregations

CollinsHeadFinder (edu.stanford.nlp.trees.CollinsHeadFinder)1 HeadFinder (edu.stanford.nlp.trees.HeadFinder)1 LeftHeadFinder (edu.stanford.nlp.trees.LeftHeadFinder)1 ModCollinsHeadFinder (edu.stanford.nlp.trees.ModCollinsHeadFinder)1 SemanticHeadFinder (edu.stanford.nlp.trees.SemanticHeadFinder)1 UniversalSemanticHeadFinder (edu.stanford.nlp.trees.UniversalSemanticHeadFinder)1 ArabicHeadFinder (edu.stanford.nlp.trees.international.arabic.ArabicHeadFinder)1 DybroFrenchHeadFinder (edu.stanford.nlp.trees.international.french.DybroFrenchHeadFinder)1 NegraHeadFinder (edu.stanford.nlp.trees.international.negra.NegraHeadFinder)1 BikelChineseHeadFinder (edu.stanford.nlp.trees.international.pennchinese.BikelChineseHeadFinder)1 ChineseHeadFinder (edu.stanford.nlp.trees.international.pennchinese.ChineseHeadFinder)1 ChineseSemanticHeadFinder (edu.stanford.nlp.trees.international.pennchinese.ChineseSemanticHeadFinder)1 SunJurafskyChineseHeadFinder (edu.stanford.nlp.trees.international.pennchinese.SunJurafskyChineseHeadFinder)1 TueBaDZHeadFinder (edu.stanford.nlp.trees.international.tuebadz.TueBaDZHeadFinder)1