Returns an iterator containing all the features of one sentence
(self)
| 46 | |
| 47 | @property |
| 48 | def values(self): |
| 49 | """Returns an iterator containing all the features of one sentence""" |
| 50 | for field in self.fields: |
| 51 | if isinstance(field, Iterable): |
| 52 | yield getattr(self, field[0].name) |
| 53 | else: |
| 54 | yield getattr(self, field.name) |
| 55 | |
| 56 | def __len__(self): |
| 57 | """Get sentence length""" |