MCPcopy Create free account
hub / github.com/google-research/language / __init__

Method __init__

language/diffqg/annotation.py:32–37  ·  view source on GitHub ↗
(self, json_dic: Dict[str, Any])

Source from the content-addressed store, hash-verified

30 is_edited: Optional[bool] = None
31
32 def __init__(self, json_dic: Dict[str, Any]) -> None:
33 self.base_text = json_dic["base"]
34 self.target_text = json_dic["target"]
35 self.question = json_dic["q"] if json_dic["q"] else None
36 self.answer_span = json_dic["a"]
37 self.is_edited = json_dic["is_edited"] if "is_edited" in json_dic else None
38
39 def key_annotation(self) -> str:
40 return f"{self.base_text}::{self.target_text}::{self.answer_span}"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected