opennlp

Natural Language Processing Using Elasticsearch and Google Cloud Api

允我心安 提交于 2019-12-24 07:09:33
问题 I want to use NLP with elasticsearch. I have been able to achieve one level by using Open NLP plugin as mentioned in comments of this question. I am getting entities like person , organization , location etc indexed while inserting documents. I have a doubt while searching the same information.Since, I need to process the terms entered by the user during query time. Following is what I have thought of: Process the query entered by user using apache NLP as specified here. Extract Person,

How to identify PP-tags/NP-tags/VP-tags in openNLP chunker?

风流意气都作罢 提交于 2019-12-24 06:58:24
问题 I want to count the numbers of pp/np/vp in the text but I don't know how to identify PP-tags/NP-tags/VP-tags in openNLP chunker? I have tried this code but it's not working. ChunkerModel cModel = new ChunkerModel(modelIn); ChunkerME chunkerME = new ChunkerME(cModel); String result[] = chunkerME.chunk(whitespaceTokenizerLine, tags); HashMap<Integer,String> phraseLablesMap = new HashMap<Integer, String>(); Integer wordCount = 1; Integer phLableCount = 0; for (String phLable : result) { if

Unable to load OpenNLP sentence model in Hadoop map-reduce job

谁都会走 提交于 2019-12-23 18:25:57
问题 I'm trying to get OpenNLP integrated into a map-reduce job on Hadoop, starting with some basic sentence splitting. Within the map function, the following code is run: public AnalysisFile analyze(String content) { InputStream modelIn = null; String[] sentences = null; // references an absolute path to en-sent.bin logger.info("sentenceModelPath: " + sentenceModelPath); try { modelIn = getClass().getResourceAsStream(sentenceModelPath); SentenceModel model = new SentenceModel(modelIn);

extract NP-VP-NP from Stanford dependency parse tree

别说谁变了你拦得住时间么 提交于 2019-12-23 15:40:25
问题 I need to extract triplets of the form NP-VP-NP from the dependency parse tree produced as the output of lexalized parsing in Stanford Parser. Whats the best way to do this. e.g. If the parse tree is as follows: (ROOT (S (S (NP (NNP Exercise)) (VP (VBZ reduces) (NP (NN stress))) (. .)) (NP (JJ Regular) (NN exercise)) (VP (VBZ maintains) (NP (JJ mental) (NN fitness))) (. .))) I need to extract 2 triplets: Exercise-reduces-stress and Regular Exercise-maintains-mental fitness Any ideas? 回答1:

traning OPenNLP error

浪尽此生 提交于 2019-12-23 11:46:42
问题 I am trying to train a Name entity model using OpenNLP, but getting this error dont know what is missing. i am new to to this OPENNLP, any one please help, can provide Train.txt file if needed lineStream = opennlp.tools.util.PlainTextByLineStream@b52598 Indexing events using cutoff of 0 Computing event counts... done. 514 events Indexing... done. Sorting and merging events... done. Reduced 514 events to 492. Done indexing. Incorporating indexed data for training... done. Number of Event

traning OPenNLP error

回眸只為那壹抹淺笑 提交于 2019-12-23 11:46:20
问题 I am trying to train a Name entity model using OpenNLP, but getting this error dont know what is missing. i am new to to this OPENNLP, any one please help, can provide Train.txt file if needed lineStream = opennlp.tools.util.PlainTextByLineStream@b52598 Indexing events using cutoff of 0 Computing event counts... done. 514 events Indexing... done. Sorting and merging events... done. Reduced 514 events to 492. Done indexing. Incorporating indexed data for training... done. Number of Event

Exception in thread “main” java.lang.NullPointerException at opennlp.tools.postag.POSTaggerME.train()

笑着哭i 提交于 2019-12-23 05:31:20
问题 There are same problem! I get InputSteram = null , I used IntelliJ IDEA, OpenNLP 1.9.1. on Ubuntu 18.04 public void makeDataTrainingModel() { model = null; System.out.println("POS model started"); //InputStream dataIn = null; InputStreamFactory dataIn = null; try { dataIn = new InputStreamFactory() { public InputStream createInputStream() throws IOException { return NLPClassifier.class.getResourceAsStream("/home/int/src /main/resources/en-pos.txt"); } }; //I get null pointer here in dataIn

Exception while integrating openNLP with Solr

穿精又带淫゛_ 提交于 2019-12-23 02:25:16
问题 I am trying to integrate openNLP with Solr 6.1.0.I configured the schema and solrconfig files as detailed in the wiki link: https://wiki.apache.org/solr/OpenNLP . changes made in solrconfig.xml file : <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" regex=".*\.jar" /> <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" regex="opennlp-.*\.jar" /> changes made in schema file : <fieldType name="text_opennlp_nvf" class="solr.TextField"

Analyse the sentences and extract person name, organization and location with the help of NLP

点点圈 提交于 2019-12-21 04:38:11
问题 I need to solve the following using NLP, can you give me pointers on how to achieve this using OpenNLP API a. How to find out if a sentence implies a certain action in the past, present or future. (e.g.) I was very sad last week - past I feel like hitting my neighbor - present I am planning to go to New York next week - future b. How to find the word which corresponds to a person or company or country (e.g.) John is planning to specialize in Electrical Engineering in UC Berkley and pursue a

Training n-gram NER with Stanford NLP

﹥>﹥吖頭↗ 提交于 2019-12-20 08:01:24
问题 Recently I have been trying to train n-gram entities with Stanford Core NLP. I have followed the following tutorials - http://nlp.stanford.edu/software/crf-faq.shtml#b With this, I am able to specify only unigram tokens and the class it belongs to. Can any one guide me through so that I can extend it to n-grams. I am trying to extract known entities like movie names from chat data set. Please guide me through in case I have mis-interpretted the Stanford Tutorials and the same can be used for