Spaces:
Sleeping
Sleeping
Commit ·
3b61042
1
Parent(s): fcdd824
Add lemmatizer
Browse files
app.py
CHANGED
|
@@ -1,11 +1,16 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from sinatools.utils import parser
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
app = FastAPI()
|
|
|
|
| 5 |
|
| 6 |
@app.get("/")
|
| 7 |
def greet_json():
|
| 8 |
|
| 9 |
output =parser.arStrip('2023الجو جميلُ')
|
| 10 |
print(output)
|
| 11 |
-
|
|
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from sinatools.utils import parser
|
| 3 |
+
from sinatools.DataDownload.downloader import download_file
|
| 4 |
+
from sinatools.morphology.morph_analyzer import analyze
|
| 5 |
+
|
| 6 |
|
| 7 |
app = FastAPI()
|
| 8 |
+
download_file('https://sina.birzeit.edu/lemmas_dic.pickle')
|
| 9 |
|
| 10 |
@app.get("/")
|
| 11 |
def greet_json():
|
| 12 |
|
| 13 |
output =parser.arStrip('2023الجو جميلُ')
|
| 14 |
print(output)
|
| 15 |
+
lemmatizer_results = analyze('ذهب الولد الى المدرسة')
|
| 16 |
+
return {"output": lemmatizer_results}
|