Args: annotators: None or empty set (only tokenizes).
(self, **kwargs)
| 146 | NON_WS = r"[^\p{Z}\p{C}]" |
| 147 | |
| 148 | def __init__(self, **kwargs): |
| 149 | """ |
| 150 | Args: |
| 151 | annotators: None or empty set (only tokenizes). |
| 152 | """ |
| 153 | self._regexp = regex.compile( |
| 154 | "(%s)|(%s)" % (self.ALPHA_NUM, self.NON_WS), |
| 155 | flags=regex.IGNORECASE + regex.UNICODE + regex.MULTILINE, |
| 156 | ) |
| 157 | if len(kwargs.get("annotators", {})) > 0: |
| 158 | logger.warning( |
| 159 | "%s only tokenizes! Skipping annotators: %s" % (type(self).__name__, kwargs.get("annotators")) |
| 160 | ) |
| 161 | self.annotators = set() |
| 162 | |
| 163 | def tokenize(self, text): |
| 164 | data = [] |
nothing calls this directly
no outgoing calls
no test coverage detected