MCPcopy Index your code
hub / github.com/clips/pattern / from_xml

Method from_xml

pattern/text/tree.py:985–989  ·  view source on GitHub ↗

Returns a new Text from the given XML string.

(cls, xml)

Source from the content-addressed store, hash-verified

983
984 @classmethod
985 def from_xml(cls, xml):
986 """ Returns a new Text from the given XML string.
987 """
988 s = parse_string(xml)
989 return Sentence(s.split("\n")[0], token=s.tags, language=s.language)
990
991 fromxml = from_xml
992

Callers

nothing calls this directly

Calls 3

parse_stringFunction · 0.85
SentenceClass · 0.70
splitMethod · 0.45

Tested by

no test coverage detected