nlp

Spacy - Save custom pipeline

对着背影说爱祢 提交于 2019-12-21 05:38:11
问题 I'm trying to integrate a custom PhraseMatcher() component into my nlp pipeline in a way that will allow me to load the custom Spacy model without having to re-add my custom components to a generic model on each load. How can I load a Spacy model containing custom pipeline components? I create the component, add it to my pipeline and save it with the following: import requests from spacy.lang.en import English from spacy.matcher import PhraseMatcher from spacy.tokens import Doc, Span, Token

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

Using Stanford CoreNLP

空扰寡人 提交于 2019-12-21 04:32:13
问题 I am trying to get around using the Stanford CoreNLP. I used some code from the web to understand what is going on with the coreference tool. I tried running the project in Eclipse but keep encountering an out of memory exception. I tried increasing the heap size but there isnt any difference. Any ideas on why this keeps happening? Is this a code specific problem? Any directions of using CoreNLP would be awesome. EDIT - Code Added import edu.stanford.nlp.dcoref.CorefChain; import edu.stanford

Algorithm for Negating Sentences

≡放荡痞女 提交于 2019-12-21 03:21:23
问题 I was wondering if anyone was familiar with any attempts at algorithmic sentence negation. For example, given a sentence like "This book is good" provide any number of alternative sentences meaning the opposite like "This book is not good" or even "This book is bad". Obviously, accomplishing this with a high degree of accuracy would probably be beyond the scope of current NLP, but I'm sure there has been some work on the subject. If anybody knows of any work, care to point me to some papers?

Algorithm for Negating Sentences

梦想的初衷 提交于 2019-12-21 03:21:13
问题 I was wondering if anyone was familiar with any attempts at algorithmic sentence negation. For example, given a sentence like "This book is good" provide any number of alternative sentences meaning the opposite like "This book is not good" or even "This book is bad". Obviously, accomplishing this with a high degree of accuracy would probably be beyond the scope of current NLP, but I'm sure there has been some work on the subject. If anybody knows of any work, care to point me to some papers?

python textblob and text classification

☆樱花仙子☆ 提交于 2019-12-21 02:59:07
问题 I'm trying do build a text classification model with python and textblob, the script is runing on my server and in the future the idea is that users will be able to submit their text and it will be classified. i'm loading the training set from csv : # -*- coding: utf-8 -*- import sys import codecs sys.stdout = open('yyyyyyyyy.txt',"w"); from nltk.tokenize import word_tokenize from textblob.classifiers import NaiveBayesClassifier with open('file.csv', 'r', encoding='latin-1') as fp: cl =

Identifying verb tenses in python

冷暖自知 提交于 2019-12-21 02:40:35
问题 How can I use Python + NLTK to identify whether a sentence refers to the past/present/future ? Can I do this only using POS tagging? This seems a bit inaccurate, seems to me that I need to consider the sentence context and not only the words alone. Any suggestion for another library that can do that? 回答1: It won't be too hard to do this yourself. This table should help you identify the different verb tenses and handling them will just be a matter of parsing the result of nltk.pos_tag(string)

How to make use of USE SharpNlp in my C# application

天涯浪子 提交于 2019-12-21 02:38:09
问题 I require POS tagging for my files in the corpus. I have successfully followed the installation instructions of SharpNlp I am using the binary version I created a new c# project in: E:\sharp\sharpapp location of Models Folder is: E:\sharp\sharpapp\bin\Models location of my SharpNlp Binary is: E:\sharp\SharpNLP-1.0.2529-Bin I have also followed the instructions to modify both .config files "ParseTree.Exe" and "ToolsExamples.Exe" Now in my c# project I have a class called tagging.cs where I

Using Sentiwordnet 3.0

回眸只為那壹抹淺笑 提交于 2019-12-21 02:22:22
问题 I plan on using Sentiwordnet 3.0 for Sentiment classification. Could someone clarify as to what the numbers associated with words in Sentiwordnet represent? For e.g. what does 5 in rank#5 mean? Also for POS what is the letter used to represent adverbs? Im assuming 'a' is adjectives. I could not find an explanation either on their site or on other sites. 回答1: I found the answer. Seems like the number notation comes form Wordnet. It represents the rank in which the given word is commonly used.

How to setup neo4j with dBpedia ontop of ruby-on-rails application?

守給你的承諾、 提交于 2019-12-20 19:57:29
问题 I am trying to use dBpedia with neo4j ontop of ruby on rails . Assuming I have installed neo4j and downloaded one of the dBpedia datasets. How do I import the dbpedia dataset into neo4j ? 回答1: The simplest way to load dbpedia into Neo4j is to use the dbpedia4neo library. This is a Java library, but you don't need to know any Java because all you need to do is run the executable. You could rewrite this in JRuby if you want, but regular Ruby won't work because it relies on Blueprints, a Java