Spaces:
Running
Running
Commit
·
e70665f
1
Parent(s):
c38ba9f
test now xx
Browse files
app.py
CHANGED
@@ -19,14 +19,20 @@ relations = {
|
|
19 |
{'source': 'Home Visits Survey', 'relation': 'data geography', 'target': 'Jordan', 'score': 0.6180844902992249},
|
20 |
{'source': 'Home Visits Survey', 'relation': 'version', 'target': 'Round II', 'score': 0.9688164591789246},
|
21 |
{'source': 'Home Visits Survey', 'relation': 'acronym', 'target': 'HV', 'score': 0.9140607714653015},
|
22 |
-
{'source': 'Home Visits Survey', 'relation': '
|
23 |
-
{'source': 'Home Visits Survey', 'relation': '
|
24 |
{'source': 'Home Visits Survey', 'relation': 'reference year', 'target': '2013', 'score': 0.524115264415741},
|
25 |
-
{'source': 'Home Visits Survey', 'relation': '
|
26 |
{'source': 'Home Visits Survey', 'relation': 'data description', 'target': 'detailed socio-economic, health, and protection data', 'score': 0.6544178128242493},
|
27 |
]
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
# Exact sample text
|
31 |
SAMPLE_TEXT = """The Jordan Home Visits Survey, Round II (HV), was carried out by UNHCR and the World Food Programme between November 2013 and September 2014. Through in-home visits to Syrian refugee households in Jordan, it gathered detailed socio-economic, health, and protection data—each household tagged with a unique ID to allow longitudinal tracking."""
|
32 |
|
|
|
19 |
{'source': 'Home Visits Survey', 'relation': 'data geography', 'target': 'Jordan', 'score': 0.6180844902992249},
|
20 |
{'source': 'Home Visits Survey', 'relation': 'version', 'target': 'Round II', 'score': 0.9688164591789246},
|
21 |
{'source': 'Home Visits Survey', 'relation': 'acronym', 'target': 'HV', 'score': 0.9140607714653015},
|
22 |
+
{'source': 'Home Visits Survey', 'relation': 'publisher', 'target': 'UNHCR', 'score': 0.7762154340744019},
|
23 |
+
{'source': 'Home Visits Survey', 'relation': 'publisher', 'target': 'World Food Programme', 'score': 0.6582539677619934},
|
24 |
{'source': 'Home Visits Survey', 'relation': 'reference year', 'target': '2013', 'score': 0.524115264415741},
|
25 |
+
{'source': 'Home Visits Survey', 'relation': 'reference year', 'target': '2014', 'score': 0.6853994131088257},
|
26 |
{'source': 'Home Visits Survey', 'relation': 'data description', 'target': 'detailed socio-economic, health, and protection data', 'score': 0.6544178128242493},
|
27 |
]
|
28 |
}
|
29 |
|
30 |
+
# 1) Non-destructive: build a new filtered dict
|
31 |
+
relations = {
|
32 |
+
src: [r for r in rels if r['source'] != r['target']]
|
33 |
+
for src, rels in relations.items()
|
34 |
+
}
|
35 |
+
|
36 |
# Exact sample text
|
37 |
SAMPLE_TEXT = """The Jordan Home Visits Survey, Round II (HV), was carried out by UNHCR and the World Food Programme between November 2013 and September 2014. Through in-home visits to Syrian refugee households in Jordan, it gathered detailed socio-economic, health, and protection data—each household tagged with a unique ID to allow longitudinal tracking."""
|
38 |
|