stop-words

    -5热度

    1回答

    我想要删除一个单词。 我有一个由大约15,000个字符串组成的列表。这些字符串是小文本。我的代码如下: h = [] for w in clean.split(): if w not in cachedStopWords: h.append(w) if w in cachedStopWords: h.append(" ") print(h) 我的

    1热度

    1回答

    我有一个带有字符串列的表。我删除字符串中的禁用词,然后将结果这个样子(这在某种程度上连接到这个link和@IMSoP建议什么的另一种情况) 'would':2 'yellow':4 我想摆脱这些报价和:和号码。我试图 UPDATE tblName SET colName= replace(colName, '\s?[a-zA-Z]\w:\d', ''); 而且这个 UPDATE tblNa

    0热度

    1回答

    我想计算几个csv文件中单词的出现次数。首先,我想展示10个最常遇到的单词,其中有停用词,然后没有停用词。 这是我的代码: import nltk nltk.download("stopwords") from nltk.corpus import stopwords myfile = sc.textFile('./Sacramento*.csv') counts = myfi

    0热度

    1回答

    我对Python和NLTK都是新手。我必须从语料库中提取名词短语,然后使用NLTK删除停用词。我已经做了我的编码,但仍然有错误。任何人都可以帮我解决这个问题吗?或者也请推荐是否有更好的解决方案。谢谢 import nltk from nltk.tokenize import word_tokenize from nltk.corpus import stopwords docid='195

    1热度

    1回答

    我试图用NLTK包写一个python程序来删除从一个句子停用词 from nltk.corpus import stopwords chachedWords = stopwords.words('english') 下面给出TypeError: 'LazyCorpusLoader' object is not callable

    1热度

    1回答

    我在JBoss 7服务器上搜索Solr 4,并试图为英语配置停用词&德语。我对停用词配置: <fieldType name="text_copy" class="solr.TextField" autoGeneratePhraseQueries="true" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class

    2热度

    2回答

    这是C#程序删除停止词和 我有错误_delimiters 任何一个帮助我吗?! 我怎样才能修复这个错误 和出放应该有 看到猫马 谷歌搜索互联网 在所有 static class StopwordTool { static Dictionary<string, bool> _stops = new Dictionary<string,bool> { { "

    1热度

    1回答

    我有清洁一组禁用词的文本功能: def clean_text(raw_text, stopwords_set): # removing everything which is not a letter letters_only = re.sub("[^a-zA-Z]", " ", raw_text) # lower case + split --> list of w

    1热度

    1回答

    我在我的pyspark数据框上使用了pyspark.ml.feature.StopWordsRemover类。它有ID和文本列。除了提供的默认停止词列表之外,我想添加自己的自定义列表以从字符串中删除所有数值。 我可以看到有一种方法可以为这个类添加setStopWords。我想我正在努力使用正确的语法来使用这种方法。 from pyspark.sql.functions import * from

    -1热度

    1回答

    我正在使用下面的解决方案来删除停用词,同时应用斯坦福NLP。 https://github.com/jconwell/coreNlp 该项目对旧版本的Lucene(3.6.2) 的依赖我需要迁移这些代码以利用了Lucene latestfeatures Lucene的5.5.2。 虽然我尝试修复以下文件, https://github.com/jconwell/coreNlp/blob/maste