Upload 2 files
Browse files- .gitattributes +1 -0
- README.md +92 -0
- model +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
model filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- flair
|
4 |
+
- token-classification
|
5 |
+
- sequence-tagger-model
|
6 |
+
language:
|
7 |
+
- id
|
8 |
+
- en
|
9 |
+
---
|
10 |
+
|
11 |
+
## English NER in Flair (default model)
|
12 |
+
|
13 |
+
This is the POS model for Indonesian and English that ships with [Flair](https://github.com/flairNLP/flair/). The architecture of this model uses **FastText**.
|
14 |
+
|
15 |
+
- F-score (micro) = **0.9409**
|
16 |
+
- F-score (macro) = **0.871**
|
17 |
+
- Accuracy = **0.9409**
|
18 |
+
|
19 |
+
Predicts 19 tags:
|
20 |
+
|
21 |
+
| **Tag** | **Meaning** |
|
22 |
+
|----------|-----------------------------------|
|
23 |
+
| NOUN | Noun (person, place, thing, or idea) |
|
24 |
+
| PROPN | Proper noun (specific name) |
|
25 |
+
| PUNCT | Punctuation (marks like commas, periods, etc.) |
|
26 |
+
| VERB | Verb (action or state) |
|
27 |
+
| ADP | Adposition (prepositions or postpositions) |
|
28 |
+
| PRON | Pronoun (substitute for a noun) |
|
29 |
+
| ADJ | Adjective (describes a noun) |
|
30 |
+
| NUM | Numeral (number or quantity) |
|
31 |
+
| DET | Determiner (a word that modifies a noun) |
|
32 |
+
| CCONJ | Coordinating conjunction (joins clauses or words) |
|
33 |
+
| ADV | Adverb (modifies a verb, adjective, or another adverb) |
|
34 |
+
| AUX | Auxiliary verb (helps the main verb) |
|
35 |
+
| SCONJ | Subordinating conjunction (introduces subordinate clauses) |
|
36 |
+
| PART | Particle (small word that doesn’t change in form, e.g., "not") |
|
37 |
+
| SYM | Symbol (mathematical or other special symbols) |
|
38 |
+
| X | Other (words that don't fit standard POS categories) |
|
39 |
+
| INTJ | Interjection (expresses strong emotion or reaction) |
|
40 |
+
|
41 |
+
---
|
42 |
+
|
43 |
+
### Demo: How to use in Flair
|
44 |
+
|
45 |
+
Requires: **[Flair](https://github.com/flairNLP/flair/)** (`pip install flair`).
|
46 |
+
|
47 |
+
You also need to download the **model** file locally to use it.
|
48 |
+
|
49 |
+
You can find training or fine-tuning code here : https://github.com/bwbayu/product_name_clustering/blob/main/additional/train_pos_flair.ipynb
|
50 |
+
|
51 |
+
```python
|
52 |
+
from flair.data import Sentence
|
53 |
+
from flair.models import SequenceTagger
|
54 |
+
|
55 |
+
tagger = SequenceTagger.load("model")
|
56 |
+
text = "aku pergi ke pasar"
|
57 |
+
sentence = Sentence(text)
|
58 |
+
tagger.predict(sentence)
|
59 |
+
for token in sentence:
|
60 |
+
print(f"{token.text} ({token.get_label('upos').value})")
|
61 |
+
|
62 |
+
```
|
63 |
+
|
64 |
+
This yields the following output:
|
65 |
+
```
|
66 |
+
aku (PRON)
|
67 |
+
pergi (VERB)
|
68 |
+
ke (ADP)
|
69 |
+
pasar (NOUN)
|
70 |
+
```
|
71 |
+
|
72 |
+
---
|
73 |
+
|
74 |
+
### Cite
|
75 |
+
|
76 |
+
Please cite the following paper when using this model.
|
77 |
+
|
78 |
+
```
|
79 |
+
@inproceedings{akbik2018coling,
|
80 |
+
title={Contextual String Embeddings for Sequence Labeling},
|
81 |
+
author={Akbik, Alan and Blythe, Duncan and Vollgraf, Roland},
|
82 |
+
booktitle = {{COLING} 2018, 27th International Conference on Computational Linguistics},
|
83 |
+
pages = {1638--1649},
|
84 |
+
year = {2018}
|
85 |
+
}
|
86 |
+
```
|
87 |
+
|
88 |
+
---
|
89 |
+
|
90 |
+
### Issues?
|
91 |
+
|
92 |
+
The Flair issue tracker is available [here](https://github.com/flairNLP/flair/issues/).
|
model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fb2d5a14897a0e942724f270b7ea315cb274ea54cae2f827e331ffdf70236f09
|
3 |
+
size 1589655528
|