Java Code Examples for org.grobid.core.GrobidModels#ENTITIES_NERSense

The following examples show how to use org.grobid.core.GrobidModels#ENTITIES_NERSense . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SenseTrainer.java    From grobid-ner with Apache License 2.0 5 votes vote down vote up
public SenseTrainer() {
    super(GrobidModels.ENTITIES_NERSense);
    descriptions = new TreeMap<String, String>();

    // we read first the module specific property file to get the paths to the resources
    Properties prop = new Properties();
    InputStream input = null;

    try {
        input = new FileInputStream("src/main/resources/grobid-ner.properties");

        // load the properties file
        prop.load(input);

        // get the property value
        reutersPath = prop.getProperty("grobid.ner.reuters.paths");
        conllPath = prop.getProperty("grobid.ner.reuters.conll_path");
        idiliaPath = prop.getProperty("grobid.ner.reuters.idilia_path");
        nerCorpusPath = prop.getProperty("grobid.ner.extra_corpus");
    } catch (IOException ex) {
        throw new GrobidResourceException(
                "An exception occured when accessing/reading the grobid-ner property file.", ex);
    } finally {
        if (input != null) {
            try {
                input.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
 
Example 2
Source File: SenseTagger.java    From grobid-ner with Apache License 2.0 4 votes vote down vote up
public SenseTagger() {
    this(GrobidModels.ENTITIES_NERSense);
}