File size: 1,402 Bytes
abb2507
 
 
edfc1d1
abb2507
 
 
 
 
 
31d9e69
abb2507
 
 
 
edfc1d1
abb2507
 
 
 
 
edfc1d1
abb2507
 
 
 
 
 
 
 
 
 
 
 
 
31d9e69
edfc1d1
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
language: 
  - ja
license: cc-by-sa-3.0
library_name: transformers
tags:
- fastText
pipeline_tag: zero-shot-classification
widget:
- text: "海賊王におれはなる"
  candidate_labels: "海, 山, 陸"
  multi_class: true
  example_title: "ワンピース"
---
# fasttext-classification
fastText word vector base classification
## Reference
- fastText </br>
https://github.com/facebookresearch/fastText
- word vector data </br>
https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.ja.300.vec.gz

## Usage
Google Colaboratory Example
```
! apt install aptitude swig > /dev/null 
! aptitude install mecab libmecab-dev mecab-ipadic-utf8 git make curl xz-utils file -y > /dev/null 
! pip install transformers torch mecab-python3 torchtyping > /dev/null 
! ln -s /etc/mecabrc /usr/local/etc/mecabrc
```
```
from transformers import pipeline
p = pipeline("zero-shot-classification", "paulhindemith/fasttext-classification", revision="2022.11.7", trust_remote_code=True)
```
```
p("海賊王におれはなる", candidate_labels=["海","山","陸"], hypothesis_template="{}", multi_label=True)
```

## License
This model utilizes the folllowing pretrained vectors.

Name: fastText  
Credit: https://fasttext.cc/ 
License: [Creative Commons Attribution-Share-Alike License 3.0](https://creativecommons.org/licenses/by-sa/3.0/) 
Link: https://dl.fbaipublicfiles.com/fasttext/vectors-wiki/wiki.ja.vec