| 49 | return [] |
| 50 | |
| 51 | class Word(object): |
| 52 | |
| 53 | def __init__(self, sentence, string, tag=None, index=0): |
| 54 | """ A word with a position in a sentence. |
| 55 | """ |
| 56 | self.sentence, self.string, self.tag, self.index = sentence, string, tag, index |
| 57 | |
| 58 | def __repr__(self): |
| 59 | return "Word(%s)" % repr(self.string) |
| 60 | |
| 61 | def _get_type(self): |
| 62 | return self.tag |
| 63 | def _set_type(self, v): |
| 64 | self.tag = v |
| 65 | |
| 66 | type = property(_get_type, _set_type) |
| 67 | |
| 68 | @property |
| 69 | def chunk(self): |
| 70 | return None |
| 71 | |
| 72 | @property |
| 73 | def lemma(self): |
| 74 | return None |
| 75 | |
| 76 | #--- STRING MATCHING ------------------------------------------------------------------------------- |
| 77 |
no outgoing calls
no test coverage detected
searching dependent graphs…