Instructions to use marefa-nlp/marefa-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marefa-nlp/marefa-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="marefa-nlp/marefa-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("marefa-nlp/marefa-ner") model = AutoModelForTokenClassification.from_pretrained("marefa-nlp/marefa-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Provide a notebook for quick using
Browse files
README.md
CHANGED
|
@@ -27,6 +27,10 @@ Person, Location, Organization, Nationality, Job, Product, Event, Time, Art-Work
|
|
| 27 |
|
| 28 |
## How to use كيف تستخدم النموذج
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
Install the following Python packages
|
| 31 |
|
| 32 |
`$ pip3 install simpletransformers==0.61.5 nltk==3.5 protobuf==3.15.3 torch==1.7.1`
|
|
@@ -103,21 +107,21 @@ for sample, results in zip(samples, entities):
|
|
| 103 |
|
| 104 |
###
|
| 105 |
# تلقى تعليمه في الكتاب ثم انضم الى الأزهر عام 1873م . تعلم على يد السيد جمال الدين الأفغاني والشيخ محمد عبده
|
| 106 |
-
# \t الأزهر => organization
|
| 107 |
-
# \t عام 1873م => time
|
| 108 |
-
# \t جمال الدين الأفغاني => person
|
| 109 |
-
# \t محمد عبده => person
|
| 110 |
# ==================
|
| 111 |
# بعد عودته إلى القاهرة، التحق نجيب الريحاني فرقة جورج أبيض، الذي كان قد ضمَّ - قُبيل ذلك - فرقته إلى فرقة سلامة حجازي . و منها ذاع صيته
|
| 112 |
-
# \t القاهرة، => location
|
| 113 |
-
# \t نجيب الريحاني => person
|
| 114 |
-
# \t فرقة جورج أبيض، => organization
|
| 115 |
-
# \t فرقة سلامة حجازي => organization
|
| 116 |
# ==================
|
| 117 |
# امبارح اتفرجت على مباراة مانشستر يونايتد مع ريال مدريد في غياب الدون كرستيانو رونالدو
|
| 118 |
-
# \t مانشستر يونايتد => organization
|
| 119 |
-
# \t ريال مدريد => organization
|
| 120 |
-
# \t كرستيانو رونالدو => person
|
| 121 |
# ==================
|
| 122 |
###
|
| 123 |
```
|
|
|
|
| 27 |
|
| 28 |
## How to use كيف تستخدم النموذج
|
| 29 |
|
| 30 |
+
*You can test the model quickly by checking this [Colab notebook](https://colab.research.google.com/drive/1OGp9Wgm-oBM5BBhTLx6Qow4dNRSJZ-F5?usp=sharing)*
|
| 31 |
+
|
| 32 |
+
-----
|
| 33 |
+
|
| 34 |
Install the following Python packages
|
| 35 |
|
| 36 |
`$ pip3 install simpletransformers==0.61.5 nltk==3.5 protobuf==3.15.3 torch==1.7.1`
|
|
|
|
| 107 |
|
| 108 |
###
|
| 109 |
# تلقى تعليمه في الكتاب ثم انضم الى الأزهر عام 1873م . تعلم على يد السيد جمال الدين الأفغاني والشيخ محمد عبده
|
| 110 |
+
# \\t الأزهر => organization
|
| 111 |
+
# \\t عام 1873م => time
|
| 112 |
+
# \\t جمال الدين الأفغاني => person
|
| 113 |
+
# \\t محمد عبده => person
|
| 114 |
# ==================
|
| 115 |
# بعد عودته إلى القاهرة، التحق نجيب الريحاني فرقة جورج أبيض، الذي كان قد ضمَّ - قُبيل ذلك - فرقته إلى فرقة سلامة حجازي . و منها ذاع صيته
|
| 116 |
+
# \\t القاهرة، => location
|
| 117 |
+
# \\t نجيب الريحاني => person
|
| 118 |
+
# \\t فرقة جورج أبيض، => organization
|
| 119 |
+
# \\t فرقة سلامة حجازي => organization
|
| 120 |
# ==================
|
| 121 |
# امبارح اتفرجت على مباراة مانشستر يونايتد مع ريال مدريد في غياب الدون كرستيانو رونالدو
|
| 122 |
+
# \\t مانشستر يونايتد => organization
|
| 123 |
+
# \\t ريال مدريد => organization
|
| 124 |
+
# \\t كرستيانو رونالدو => person
|
| 125 |
# ==================
|
| 126 |
###
|
| 127 |
```
|