บทช่วยสอนการประมวลผลข้อความ TensorFlow
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
บทช่วยสอนการประมวลผลข้อความ TensorFlow ให้คำแนะนำทีละขั้นตอนสำหรับการแก้ปัญหาข้อความทั่วไปและการประมวลผลภาษาธรรมชาติ (NLP)
TensorFlow นำเสนอสองโซลูชันสำหรับการประมวลผลข้อความและภาษาธรรมชาติ ได้แก่ KerasNLP และ TensorFlow Text KerasNLP เป็นไลบรารี NLP ระดับสูงที่มีโมเดลที่ใช้ Transformer ล่าสุดทั้งหมด ตลอดจนยูทิลิตีโทเค็นระดับล่าง เป็นวิธีแก้ปัญหาที่แนะนำสำหรับกรณีการใช้งาน NLP ส่วนใหญ่
หากคุณต้องการเข้าถึงเครื่องมือประมวลผลข้อความระดับล่าง คุณสามารถใช้ TensorFlow Text ได้ TensorFlow Text มอบคอลเล็กชันของ ops และไลบรารีเพื่อช่วยให้คุณทำงานกับอินพุตในรูปแบบข้อความ เช่น สตริงข้อความดิบหรือเอกสาร
KerasNLP
- เริ่มต้นใช้งาน KerasNLP : เรียนรู้ KerasNLP โดยทำการวิเคราะห์ความรู้สึกที่ระดับความซับซ้อนที่ก้าวหน้า ตั้งแต่การใช้แบบจำลองที่ได้รับการฝึกอบรมล่วงหน้าไปจนถึงการสร้าง Transformer ของคุณเองตั้งแต่เริ่มต้น
การสร้างข้อความ
การจำแนกข้อความ
- จัดประเภทข้อความด้วย BERT : ปรับแต่ง BERT อย่างละเอียดเพื่อทำการวิเคราะห์ความรู้สึกในชุดข้อมูลบทวิจารณ์ภาพยนตร์ IMDb แบบข้อความล้วน
- การจัดหมวดหมู่ข้อความด้วย RNN : ฝึก RNN เพื่อทำการวิเคราะห์ความคิดเห็นเกี่ยวกับบทวิจารณ์ภาพยนตร์ IMDb
- TF.Text Metrics : เรียนรู้เกี่ยวกับเมตริกที่มีให้ผ่าน TensorFlow Text ไลบรารีมีการใช้งานเมตริกความคล้ายคลึงของข้อความ เช่น ROUGE-L ซึ่งสามารถใช้สำหรับการประเมินโมเดลการสร้างข้อความโดยอัตโนมัติ
NLP กับ BERT
การฝัง
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-07-27 UTC
[null,null,["อัปเดตล่าสุด 2023-07-27 UTC"],[],[],null,["# TensorFlow text processing tutorials\n\n\u003cbr /\u003e\n\nThe TensorFlow text processing tutorials provide step-by-step instructions for\nsolving common text and natural language processing (NLP) problems.\n\nTensorFlow provides two solutions for text and natural language processing:\nKerasNLP and TensorFlow Text. KerasNLP is a high-level NLP library that includes\nall the latest Transformer-based models as well as lower-level tokenization\nutilities. It's the recommended solution for most NLP use cases.\n\nIf you need access to lower-level text processing tools, you can use\nTensorFlow Text. TensorFlow Text provides a collection of ops and libraries to\nhelp you work with input in text form such as raw text strings or documents.\n\nKerasNLP\n--------\n\n- [Getting Started with KerasNLP](https://keras.io/guides/keras_nlp/getting_started/): Learn KerasNLP by performing sentiment analysis at progressive levels of complexity, from using a pre-trained model to building your own Transformer from scratch.\n\nText generation\n---------------\n\n- [Text generation with an RNN](https://tensorflow.org/text/tutorials/text_generation): Generate text using a character-based RNN and a dataset of Shakespeare's writing.\n- [Neural machine translation with attention](https://tensorflow.org/text/tutorials/nmt_with_attention): Train a sequence-to-sequence (seq2seq) model for Spanish-to-English translation.\n- [Neural machine translation with a Transformer and Keras](https://tensorflow.org/text/tutorials/transformer): Create and train a sequence-to-sequence Transformer model to translate Portuguese into English.\n- [Image captioning with visual attention](https://tensorflow.org/text/tutorials/image_captioning): Generate image captions using a Transformer-decoder model built with attention layers.\n\nText classification\n-------------------\n\n- [Classify text with BERT](https://tensorflow.org/text/tutorials/classify_text_with_bert): Fine-tune BERT to perform sentiment analysis on a dataset of plain-text IMDb movie reviews.\n- [Text classification with an RNN](https://tensorflow.org/text/tutorials/text_classification_rnn): Train an RNN to perform sentiment analysis on IMDb movie reviews.\n- [TF.Text Metrics](https://tensorflow.org/text/tutorials/text_similarity): Learn about the metrics available through TensorFlow Text. The library contains implementations of text-similarity metrics such as ROUGE-L, which can be used for automatic evaluation of text generation models.\n\nNLP with BERT\n-------------\n\n- [Solve GLUE tasks using BERT on TPU](https://tensorflow.org/text/tutorials/bert_glue): Learn how to fine-tune BERT for tasks from the [GLUE benchmark](https://gluebenchmark.com/).\n- [Fine-tuning a BERT model](https://tensorflow.org/tfmodels/nlp/fine_tune_bert): Fine-tune a BERT model using [TensorFlow Model Garden](https://github.com/tensorflow/models).\n- [Uncertainty-aware Deep Language Learning with BERT-SNGP](https://tensorflow.org/text/tutorials/uncertainty_quantification_with_sngp_bert): Apply [SNGP](https://arxiv.org/abs/2006.10108) to a natural language understanding (NLU) task. Building on a BERT encoder, you'll improve the NLU model's ability to detect out-of-scope queries.\n\nEmbeddings\n----------\n\n- [Word embeddings](https://tensorflow.org/text/guide/word_embeddings): Train your own word embeddings using a simple Keras model for a sentiment classification task, and then visualize them using the [Embedding Projector](https://www.tensorflow.org/tensorboard/tensorboard_projector_plugin).\n- [Warm-start embedding layer matrix](https://tensorflow.org/text/tutorials/warmstart_embedding_matrix): Learn how to \"warm-start\" training for a text sentiment classification model.\n- [word2vec](https://tensorflow.org/text/tutorials/word2vec): Train a word2vec model on a small dataset and visualize the trained embeddings in the [Embedding Projector](https://www.tensorflow.org/tensorboard/tensorboard_projector_plugin)."]]