Dmitry Kirsanov commited on
Commit
decdef2
·
1 Parent(s): d85bdf8

wrong api

Browse files
Files changed (1) hide show
  1. understand.py +4 -4
understand.py CHANGED
@@ -341,7 +341,7 @@ Here's the derivative document:
341
  self.split_sentences(src="document", dst="document")
342
  self.annotate_sentences_with_actors( src="document", dst="document with actors")
343
  self.annotate_sentences_with_audiences(src="document", dst="document with audiences")
344
- self.extract_and_cleanup_for_audience(src='document', audience=self.fad.get_notes_by_type("actor")[0], dst="document for {audience}")
345
 
346
  def get_understanding(self):
347
  self.understand()
@@ -349,13 +349,13 @@ Here's the derivative document:
349
  return (
350
  self.fad.get_values_by_type("document type")[0],
351
  self.fad.get_values_by_type("document summary")[0],
352
- "=== Concepts:\n"+newline.join(["- " + x for x in self.fad.get_notes_by_type("concept")]),
353
  self.values.get("concepts jackard distance"),
354
- "=== Actors:\n"+newline.join(["- " + x for x in self.fad.get_notes_by_type("actor")]),
355
  self.values.get("actors jackard distance"),
356
  "=== Document annotated:\n"+self.values.get("document with audiences"),
357
  "=== Document annotated, diff of 2 attempts:\n"+self.values.get("document with audiences, diff"),
358
- f"=== Document rewritten for {self.values.get('actors, generalized')[0]}:\n"+self.values.get(f"""document for {self.fad.get_notes_by_type("actor")[0]}""")
359
  )
360
 
361
 
 
341
  self.split_sentences(src="document", dst="document")
342
  self.annotate_sentences_with_actors( src="document", dst="document with actors")
343
  self.annotate_sentences_with_audiences(src="document", dst="document with audiences")
344
+ self.extract_and_cleanup_for_audience(src='document', audience=self.fad.get_values_by_type("actor")[0], dst="document for {audience}")
345
 
346
  def get_understanding(self):
347
  self.understand()
 
349
  return (
350
  self.fad.get_values_by_type("document type")[0],
351
  self.fad.get_values_by_type("document summary")[0],
352
+ "=== Concepts:\n"+newline.join(["- " + x for x in self.fad.get_values_by_type("concept")]),
353
  self.values.get("concepts jackard distance"),
354
+ "=== Actors:\n"+newline.join(["- " + x for x in self.fad.get_values_by_type("actor")]),
355
  self.values.get("actors jackard distance"),
356
  "=== Document annotated:\n"+self.values.get("document with audiences"),
357
  "=== Document annotated, diff of 2 attempts:\n"+self.values.get("document with audiences, diff"),
358
+ f"=== Document rewritten for {self.values.get('actors, generalized')[0]}:\n"+self.values.get(f"""document for {self.fad.get_values_by_type("actor")[0]}""")
359
  )
360
 
361