pytorch/text là dự án Python với 3.6k sao trong nhóm AI Tools. Models, data loaders and abstractions for language processing, powered by PyTorch
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
torchtext.vocab <https://github.com/pytorch/text/tree/main/torchtext/vocab>_: Vocab and Vectors related classes and factory functions
examples <https://github.com/pytorch/text/tree/main/examples>_: Example NLP workflows with PyTorch and torchtext library.
Installation
We recommend Anaconda as a Python package management system. Please refer to pytorch.org <https://pytorch.org/>_ for the details of PyTorch installation. The following are the corresponding torchtext versions and supported Python versions.
Alternatively, you might want to use the Moses <http://www.statmt.org/moses/>_ tokenizer port in SacreMoses <https://github.com/alvations/sacremoses>_ (split from NLTK <http://nltk.org/>_). You have to install SacreMoses::
pip install sacremoses
For torchtext 0.5 and below, sentencepiece::
conda install -c powerai sentencepiece
Building from source
To build torchtext from source, you need git, CMake and C++11 compiler such as g++.::
git clone https://github.com/pytorch/text torchtext
cd torchtext
git submodule update --init --recursive
# Linux
python setup.py clean install
# OSX
CC=clang CXX=clang++ python setup.py clean install
# or ``python setup.py develop`` if you are making modifications.
Note
When building from source, make sure that you have the same C++ compiler as the one used to build PyTorch. A simple way is to build PyTorch from source and use the same environment to build torchtext.
If you are using the nightly build of PyTorch, checkout the environment it was built with conda (here) <https://github.com/pytorch/builder/tree/main/conda>_ and pip (here) <https://github.com/pytorch/builder/tree/main/manywheel>_.
Additionally, datasets in torchtext are implemented using the torchdata library. Please take a look at the
installation instructions <https://github.com/pytorch/data#installation>_ to download the latest nightlies or install from source.
Documentation
Find the documentation here <https://pytorch.org/text/>_.
Datasets
The datasets module currently contains:
Language modeling: WikiText2, WikiText103, PennTreebank, EnWik9
To get started with torchtext, users may refer to the following tutorial available on PyTorch website.
SST-2 binary text classification using XLM-R pre-trained model <https://pytorch.org/text/stable/tutorials/sst2_classification_non_distributed.html>_
Text classification with AG_NEWS dataset <https://pytorch.org/tutorials/beginner/text_sentiment_ngrams_tutorial.html>_
Translation trained with Multi30k dataset using transformers and torchtext <https://pytorch.org/tutorials/beginner/translation_transformer.html>_
Language modeling using transforms and torchtext <https://pytorch.org/tutorials/beginner/transformer_tutorial.html>_
Disclaimer on Datasets
This is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset's license.
If you're a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML community!
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/pytorch/text là nguồn chính thức.
pytorch/text có những chủ đề gì?
GitHub topics của pytorch/text: "data-loader", "dataset", "deep-learning", "models", "nlp", "pytorch". TopGit xếp repo vào nhóm AI Tools.
pytorch/text có phải mã nguồn mở không?
Có — pytorch/text phát hành theo license BSD-3-Clause, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/pytorch/text.
pytorch/text có trang demo không?
Dự án có trang chủ ở https://pytorch.org/text. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
pytorch/text còn đang phát triển không?
Commit gần nhất trên pytorch/text là 1.2 năm trước (theo timestamp GitHub). Repo có 807 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
pytorch/text dùng license gì?
pytorch/text phát hành theo license BSD-3-Clause. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về text?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về text.