การอ้างอิง API สำหรับไลบรารีข้อความและ NLP
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เคราสNLP
การอ้างอิง API
วิธีที่ง่ายที่สุดในการเริ่มต้นประมวลผลข้อความใน TensorFlow คือการใช้ KerasNLP ซึ่งเป็นไลบรารีการประมวลผลภาษาธรรมชาติที่มีส่วนประกอบแบบโมดูลาร์พร้อมน้ำหนักและสถาปัตยกรรมที่ตั้งไว้ล่วงหน้าที่ล้ำสมัย คุณสามารถใช้ส่วนประกอบ KerasNLP ได้ทันทีหรือปรับแต่งได้ตามต้องการ KerasNLP เน้นการคำนวณในกราฟสำหรับเวิร์กโฟลว์ทั้งหมด ดังนั้นคุณจึงสามารถคาดหวังการผลิตที่ง่ายดายโดยใช้ระบบนิเวศ TensorFlow
หากต้องการติดตั้ง KerasNLP โปรดดู การติดตั้ง
ข้อความเทนเซอร์โฟลว์
การอ้างอิง API
แพ็คเกจ tensorflow_text
มีคอลเลกชันของคลาสที่เกี่ยวข้องกับข้อความและการดำเนินการที่พร้อมใช้งานกับ TensorFlow ไลบรารีสามารถทำการประมวลผลล่วงหน้าซึ่งจำเป็นสำหรับโมเดลแบบข้อความเป็นประจำ และมีคุณสมบัติอื่นๆ ที่เป็นประโยชน์สำหรับการสร้างแบบจำลองลำดับที่ไม่ได้มาจาก Core TensorFlow
สำหรับรายละเอียดการติดตั้ง โปรดดู คำแนะนำ
โมเดล TensorFlow - NLP
การอ้างอิง API
พื้นที่เก็บข้อมูล TensorFlow Models นำเสนอการใช้งานโมเดลที่ล้ำสมัย (SOTA) แพ็คเกจ pip tensorflow-models-official
ประกอบด้วยฟังก์ชันและคลาสระดับสูงมากมายสำหรับการสร้างแบบจำลอง SOTA NLP รวมถึง nlp.layers
, nlp.losses
, nlp.models
และ nlp.tasks
คุณสามารถติดตั้งแพ็คเกจด้วย pip
:
$ pip install tensorflow-models-official # For the latest release
$ #or
$ pip install tf-models-nightly # For the nightly build
ฟังก์ชันการทำงานของ NLP มีอยู่ในโมดูลย่อย tfm.nlp
import tensorflow_models as tfm
tfm.nlp
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# API reference for text and NLP libraries.\n\nKerasNLP\n--------\n\n[API reference](https://keras.io/api/keras_nlp/)\n\nThe easiest way to get started processing text in TensorFlow is to use KerasNLP,\na natural language processing library that provides modular components with\nstate-of-the-art preset weights and architectures. You can use KerasNLP\ncomponents out-of-the-box or customize them as needed. KerasNLP\nemphasizes in-graph computation for all workflows, so you can expect easy\nproductionization using the TensorFlow ecosystem.\n\nTo install KerasNLP, see\n[Installation](https://keras.io/keras_nlp/#installation).\n\nTensorFlow Text\n---------------\n\n[API reference](https://www.tensorflow.org/text/api_docs/python/text)\n\nThe `tensorflow_text` package provides a collection of text related classes and\nops ready to use with TensorFlow. The library can perform the preprocessing\nregularly required by text-based models, and includes other features useful for\nsequence modeling not provided by core TensorFlow.\n\nFor installation details, refer to the\n[the guide](https://www.tensorflow.org/text/guide/tf_text_intro)\n\nTensorFlow Models - NLP\n-----------------------\n\n[API reference](https://tensorflow.org/api_docs/python/tfm/nlp)\n\nThe\n[TensorFlow Models repository](https://github.com/tensorflow/models)\nprovides implementations of state-of-the-art (SOTA) models. The\n`tensorflow-models-official` pip package includes many high-level functions and\nclasses for building SOTA NLP models including [`nlp.layers`](https://www.tensorflow.org/api_docs/python/tfm/nlp/layers), [`nlp.losses`](https://www.tensorflow.org/api_docs/python/tfm/nlp/losses),\n[`nlp.models`](https://www.tensorflow.org/api_docs/python/tfm/nlp/models) and [`nlp.tasks`](https://www.tensorflow.org/api_docs/python/tfm/nlp/tasks).\n\nYou can install the package with `pip`: \n\n $ pip install tensorflow-models-official # For the latest release\n $ #or\n $ pip install tf-models-nightly # For the nightly build\n\nThe NLP functionality is available in the [`tfm.nlp`](https://www.tensorflow.org/api_docs/python/tfm/nlp) submodule. \n\n import tensorflow_models as tfm\n tfm.nlp"]]