Shivam098 commited on
Commit
56bc884
1 Parent(s): 7a0f886

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -6,7 +6,19 @@ import json
6
 
7
  # Initialize spaCy
8
  nlp = spacy.load("en_core_web_md", disable=["ner"])
9
-
 
 
 
 
 
 
 
 
 
 
 
 
10
  # Define sample data
11
  data = {
12
  "fruit": ["apple", "pear", "orange"],
 
6
 
7
  # Initialize spaCy
8
  nlp = spacy.load("en_core_web_md", disable=["ner"])
9
+ nlp.add_pipe(
10
+ "concise_concepts",
11
+ config={
12
+ "data": data,
13
+ "ent_score": True, # Entity Scoring section
14
+ "verbose": True,
15
+ "exclude_pos": ["VERB", "AUX"],
16
+ "exclude_dep": ["DOBJ", "PCOMP"],
17
+ "include_compound_words": False,
18
+ "json_path": "./fruitful_patterns.json",
19
+ "topn": (100,500,300)
20
+ },
21
+ )
22
  # Define sample data
23
  data = {
24
  "fruit": ["apple", "pear", "orange"],