Spaces:
Runtime error
Runtime error
Dmitry Kirsanov commited on
Commit ·
e36eee2
1
Parent(s): 61bd802
xpath fix
Browse files- understand.py +1 -1
understand.py
CHANGED
|
@@ -243,7 +243,7 @@ Output just the document with the audience markup sentence, but otherwise unchan
|
|
| 243 |
def split_document(self):
|
| 244 |
audience = self.values.get("actors, generalized")[0]
|
| 245 |
derivative_string = f"<document>{self.values.get('FAD with audience')}</document>"
|
| 246 |
-
derivative = newline.join(ET.fromstring(derivative_string).findall(f"//sentence[contains(@audience,'{audience}')]/text()"))
|
| 247 |
ret = self.query(
|
| 248 |
f"""Below is a document inside <document>...</document>. It is a {self.values.get("document type")}.
|
| 249 |
|
|
|
|
| 243 |
def split_document(self):
|
| 244 |
audience = self.values.get("actors, generalized")[0]
|
| 245 |
derivative_string = f"<document>{self.values.get('FAD with audience')}</document>"
|
| 246 |
+
derivative = newline.join(ET.fromstring(derivative_string).findall(f".//sentence[contains(@audience,'{audience}')]/text()"))
|
| 247 |
ret = self.query(
|
| 248 |
f"""Below is a document inside <document>...</document>. It is a {self.values.get("document type")}.
|
| 249 |
|