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

Method string

pattern/text/search.py:637–645  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

635
636 @property
637 def string(self):
638 a = self.words + self.tags + self.chunks + self.roles + [w.upper() for w in self.taxa]
639 a = (escape(s) for s in a)
640 a = (s.replace("\\*", "*") for s in a)
641 a = [s.replace(" ", "_") for s in a]
642 if self.exclude:
643 a.extend("!"+s for s in self.exclude.string[1:-1].split("|"))
644 return (self.optional and "%s(%s)%s" or "%s[%s]%s") % (
645 self.first and "^" or "", "|".join(a), self.multiple and "+" or "")
646
647#--- PATTERN ---------------------------------------------------------------------------------------
648

Callers

nothing calls this directly

Calls 3

escapeFunction · 0.70
extendMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected