
Python自然语言处理
文章平均质量分 83
XianxinMao
可提供咨询,欢迎私信交流
展开
-
A very simple framework for state-of-the-art Natural Language Processing (NLP) ------ note-2
flairNLP-1Let’s use a pre-trained model for named entity recognition (NER). This model was trained over the English CoNLL-03 task and can recognize 4 different entity types.All you need to do is use the predict() method of the tagger on a sentence. This原创 2021-12-04 22:51:50 · 385 阅读 · 0 评论 -
A very simple framework for state-of-the-art Natural Language Processing (NLP) ------ note-1
flairNLPFlair is:A powerful NLP library. Flair allows you to apply our state-of-the-art natural language processing (NLP) models to your text, such as named entity recognition (NER), part-of-speech tagging (PoS), special support for biomedical data, sen原创 2021-12-04 22:50:55 · 608 阅读 · 0 评论 -
Introducing TensorFlow Similarity
tensorflow_similarityToday we are releasing the first version of TensorFlow Similarity, a python package designed to make it easy and fast to train similarity models using TensorFlow.Examples of nearest neighbor searches performed on the embeddings gene原创 2021-11-15 11:29:10 · 1399 阅读 · 0 评论 -
Basic text classification ------ TensorFlow
text_classification文本分类对 IMDB 数据集里的评论进行情感分析,其实就是分为正面和负面两类评论对 Stack Overflow 上的编程问题进行打标签This tutorial demonstrates text classification starting from plain text files stored on disk. You’ll train a binary classifier to perform sentiment analysis on an IM原创 2021-11-13 15:54:09 · 1027 阅读 · 0 评论 -
Exploring the TF-Hub CORD-19 Swivel Embeddings
cord_19_embeddings_kerasThese embeddings were trained on the titles, authors, abstracts, body texts, and reference titles of articles in the CORD-19 datasetIn this colab we will:Analyze semantically similar words in the embedding spaceTrain a classifi原创 2021-11-04 20:46:02 · 321 阅读 · 0 评论 -
Bangla Article Classification With TF-Hub
bangla_article_classifierThis Colab is a demonstration of using TensorFlow Hub for text classification in non-English/local languages. Here we choose Bangla as the local language and use pretrained word embeddings to solve a multiclass classification task原创 2021-11-04 18:17:15 · 332 阅读 · 0 评论 -
How to solve a problem on Kaggle with TF-Hub
text_classification_with_tf_hub_on_kaggleTF-Hub is a platform to share machine learning expertise packaged in reusable resources, notably pre-trained modules. In this tutorial, we will use a TF-Hub text embedding module to train a simple sentiment classif原创 2021-11-04 10:46:05 · 181 阅读 · 0 评论 -
Universal Sentence Encoder ----- TF Hub
semantic_similarity_with_tf_hub_universal_encoderThis notebook illustrates how to access the Universal Sentence Encoder and use it for sentence similarity and sentence classification tasksThe Universal Sentence Encoder makes getting sentence level embedd原创 2021-11-03 21:24:51 · 491 阅读 · 0 评论 -
Solve GLUE tasks using BERT ----- TF Hub
bert_glueBERT can be used to solve many problems in natural language processing. You will learn how to fine-tune BERT for many tasks from the GLUE benchmark:CoLA (Corpus of Linguistic Acceptability): Is the sentence grammatically correct ?SST-2 (Stanfo原创 2021-11-03 21:13:33 · 298 阅读 · 0 评论 -
BERT Experts from TF-Hub
bert_expertsThis colab demonstrates how to:Load BERT models from TensorFlow Hub that have been trained on different tasks including MNLI, SQuAD, and PubMedUse a matching preprocessing model to tokenize raw text and convert it to idsGenerate the pooled原创 2021-11-01 20:13:52 · 183 阅读 · 0 评论 -
Multilingual Universal Sentence Encoder Q&A Retrieval ---- TF Hub
retrieval_with_tf_hub_universal_encoder_qaThis is a demo for using Universal Encoder Multilingual Q&A model for question-answer retrieval of text, illustrating the use of question_encoder and response_encoder of the model. We use sentences from SQuAD原创 2021-11-01 13:47:11 · 259 阅读 · 0 评论 -
Semantic Search with Approximate Nearest Neighbors and Text Embeddings ----- TF Hub
tf2_semantic_approximate_nearest_neighborsThis tutotial illustrates how to generate embeddings from a TensorFlow Hub (TF-Hub) module given input data, and build an approximate nearest neighbours (ANN) index using the extracted embeddings. The index can th原创 2021-11-01 11:34:28 · 200 阅读 · 0 评论 -
Classify text with BERT ---- TF Hub
classify_text_with_bertThis tutorial contains complete code to fine-tune BERT to perform sentiment analysis on a dataset of plain-text IMDB movie reviews. In addition to training a model, you will learn how to preprocess text into an appropriate format.I原创 2021-10-31 21:21:54 · 314 阅读 · 0 评论 -
Text Classification with Movie Reviews ----- TF Hub
tf2_text_classificationThis notebook classifies movie reviews as positive or negative using the text of the review. This is an example of binary or two-class-classification, an important and widely applicable kind of machine learning problemWe’ll use the原创 2021-10-30 23:44:25 · 205 阅读 · 0 评论 -
Text classification with TensorFlow Hub: Movie reviews
This notebook classifies movie reviews as positive or negative using the text of the review. This is an example of binary—or two-class—classification, an important and widely applicable kind of machine learning problem.The tutorial demonstrates the basic原创 2021-07-31 19:53:06 · 257 阅读 · 0 评论 -
Building deep retrieval models
In the featurization tutorial we incorporated multiple features into our models, but the models consist of only an embedding layer. We can add more dense layers to our models to increase their expressive power. In general, deeper models are capable of lear原创 2021-07-30 23:03:29 · 230 阅读 · 0 评论 -
Taking advantage of context features
In the featurization tutorial we incorporated multiple features beyond just user and movie identifiers into our models, but we haven't explored whether those features improve model accuracy.Many factors affect whether features beyond ids are useful in a原创 2021-07-30 20:26:55 · 212 阅读 · 0 评论 -
Using side features: feature preprocessing
One of the great advantages of using a deep learning framework to build recommender models is the freedom to build rich, flexible feature representations.These need to be appropriately transformed in order to be useful in building models: User and ite原创 2021-07-30 14:26:47 · 472 阅读 · 1 评论 -
TensorFlow Recommenders: Quickstart
In this tutorial, we build a simple matrix factorization model using the MovieLens 100K dataset with TFRS. We can use this model to recommend movies for a given user.Import TFRSfrom typing import Dict, Textimport numpy as npimport tensorflow as tf原创 2021-07-30 11:00:20 · 367 阅读 · 0 评论 -
Recommending movies: retrieval
Real-world recommender systems are often composed of two stages: The retrieval stage is responsible for selecting an initial set of hundreds of candidates from all possible candidates. The main objective of this model is to efficiently weed out all cand原创 2021-07-28 13:38:08 · 265 阅读 · 0 评论 -
用RNN进行文本分类
本教程的目的是带领大家学会用 RNN 进行文本分类本次用到的数据集是 IMDB,一共有 50000 条电影评论,其中 25000 条是训练集,另外 25000 条是测试集首先我们需要加载数据集,可以通过 TFDS 很简单的把数据集下载过来,如下代码所示dataset, info = tfds.load('imdb_reviews', with_info=True, as_supervised=True)train_dataset, test_dataset = dataset['trai原创 2021-07-26 10:41:09 · 9814 阅读 · 0 评论 -
错误分析+文本分类
原创 2017-04-23 23:03:11 · 1071 阅读 · 2 评论 -
过拟合
原创 2017-04-23 14:14:23 · 445 阅读 · 0 评论 -
学习文本分类(一)
原创 2017-04-20 17:00:22 · 420 阅读 · 0 评论 -
学习文本分类(一) 补充1
原创 2017-04-20 17:21:57 · 392 阅读 · 0 评论