摘要:参考:Keras API reference 参考:Keras layers API 目录: to_categorical() randint() random() Sequential() Model training APIs compile() fit() evaluate() predict
阅读全文
摘要:参考:【推荐】ML Lecture 21-1: Recurrent Neural Network (Part I) 参考:Illustrated Guide to Recurrent Neural Networks 参考:Illustrated Guide to LSTM’s and GRU’s:
阅读全文
摘要:词干(word stem)表示每个单词的主体部分。词干提取(stemming)就是提取词干的过程,通常是删除常见的后缀来实现。 词形还原(lemmatization)考虑了单词在句子中的作用,单词的标准化形式为词元(lemma)。 词干提取和词形还原这两种处理方法都是标准化(normalizatio
阅读全文
摘要:利用 sklearn.feature_extraction.text 中的 CountVectorizer 来实现 首先获取所有的文本信息 然后将文本信息转化为从 0 开始的数字 获取转换后的字符向量 参见如下代码: >>> text_01 = "My name is Alex Lee." >>>
阅读全文
摘要:参考:An Introduction to Recurrent Neural Networks for Beginners 其中每一个彩色框都是一排神经元,相当于普通 NN 的一层,例如 X0 为 input 层,然后 h0 为 hidden 层,y0 为 output 层; 以此类推,X1...X
阅读全文
摘要:相关类与方法说明: from keras.preprocessing.text import Tokenizer Tokenizer:文本标记实用类。该类允许使用两种方法向量化一个文本语料库: 将每个文本转化为一个整数序列(每个整数都是词典中标记的索引); 或者将其转化为一个向量,其中每个标记的系数
阅读全文
摘要:目录: 1. 停用词(stopwords) ref: Removing stop words with NLTK in Python ref: Remove Stop Words 2. 介词(prepositions, part of speech) ref: How do I remove ver
阅读全文