TymaaHammouda commited on
Commit
d70862f
·
1 Parent(s): bde3485

Test NER model

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -22,13 +22,10 @@ download_file(url='https://sina.birzeit.edu/two_grams.pickle', dest_path=dest_pa
22
 
23
  from sinatools.morphology.morph_analyzer import analyze
24
 
25
- # download_file('https://sina.birzeit.edu/lemmas_dic.pickle')
26
- # download_folder_from_hf("TymaaHammouda/testing_lemmatizer_model", 'lemmas_dic.pickle')
27
 
28
- # args_path = hf_hub_download(
29
- # repo_id="SinaLab/Nested",
30
- # filename="args.json"
31
- # )
32
 
33
  @app.get("/")
34
  def greet_json():
@@ -36,4 +33,6 @@ def greet_json():
36
  output =parser.arStrip('2023الجو جميلُ')
37
  print(output)
38
  lemmatizer_results = analyze('ذهب الولد الى المدرسة')
39
- return {"output": lemmatizer_results}
 
 
 
22
 
23
  from sinatools.morphology.morph_analyzer import analyze
24
 
 
 
25
 
26
+ download_file(url='https://sina.birzeit.edu/Wj27012000.tar.gz', dest_path=dest_path)
27
+ from sinatools.ner.entity_extractor import extract
28
+
 
29
 
30
  @app.get("/")
31
  def greet_json():
 
33
  output =parser.arStrip('2023الجو جميلُ')
34
  print(output)
35
  lemmatizer_results = analyze('ذهب الولد الى المدرسة')
36
+
37
+ ner_output = extract('ذهب محمد الى جامعة بيرزيت')
38
+ return {"output": ner_output}