Token Classification
Transformers
Safetensors
French
bert
newsagency
ner
historical
impresso
multilingual
Instructions to use impresso-project/ner-newsagency-bert-fr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use impresso-project/ner-newsagency-bert-fr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="impresso-project/ner-newsagency-bert-fr")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("impresso-project/ner-newsagency-bert-fr") model = AutoModelForTokenClassification.from_pretrained("impresso-project/ner-newsagency-bert-fr") - Notebooks
- Google Colab
- Kaggle
Update newsagency_ner.py
Browse files- newsagency_ner.py +2 -0
newsagency_ner.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
from transformers import Pipeline
|
| 2 |
import numpy as np
|
| 3 |
import torch
|
|
|
|
|
|
|
| 4 |
from nltk.chunk import conlltags2tree
|
| 5 |
from nltk import pos_tag
|
| 6 |
from nltk.tree import Tree
|
|
|
|
| 1 |
from transformers import Pipeline
|
| 2 |
import numpy as np
|
| 3 |
import torch
|
| 4 |
+
import nltk
|
| 5 |
+
nltk.download('averaged_perceptron_tagger')
|
| 6 |
from nltk.chunk import conlltags2tree
|
| 7 |
from nltk import pos_tag
|
| 8 |
from nltk.tree import Tree
|