rafmacalaba commited on
Commit
ce82a96
·
1 Parent(s): 4f3e097

new example with new rels

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -19,15 +19,13 @@ relation_extractor = CustomGLiNERRelationExtractor(model=model, return_index=Tru
19
 
20
  # Sample text
21
  SAMPLE_TEXT = (
22
- "In 2019, the third round of the Demographic and Health Survey (DHS) was conducted in 2020 by the World Bank, serving as the principal data source for a nationally representative cross‐sectional survey that covered Nigeria, Kenya, and Ghana and providing detailed demographic, health, and nutrition data, including household composition, fertility and mortality rates, maternal and child health indicators, and access to water and sanitation."
23
  )
24
 
25
  # Post-processing: prune acronyms and self-relations
26
 
27
  labels = ['named dataset', 'unnamed dataset', 'vague dataset']
28
- rels = ['acronym', 'author', 'data description',\
29
- 'data geography', 'data source', 'data type',\
30
- 'publication year', 'publisher', 'reference year', 'version']
31
 
32
  TYPE2RELS = {
33
  "named dataset": rels,
 
19
 
20
  # Sample text
21
  SAMPLE_TEXT = (
22
+ "In 2010, Smith published the third round of the Demographic and Health Survey (DHS), a nationally representative cross-sectional survey funded and published by the World Bank with fieldwork reference year 2019 and a reference population of women aged 15–49. Conducted in 2020, it serves as the principal data source for collecting household composition, fertility and mortality rates, maternal and child health indicators, and access to water and sanitation across Nigeria, Kenya, and Ghana."
23
  )
24
 
25
  # Post-processing: prune acronyms and self-relations
26
 
27
  labels = ['named dataset', 'unnamed dataset', 'vague dataset']
28
+ rels = ['acronym', 'author', 'data description', 'data geography', 'data source', 'data type', 'publication year', 'publisher', 'reference population', 'reference year', 'version']
 
 
29
 
30
  TYPE2RELS = {
31
  "named dataset": rels,