From 21008ad2d8cd82a72b08e2f9e3d3a75eb32360b5 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 7 Mar 2019 10:45:24 +0100 Subject: [PATCH] Draft API for morphological analysis class --- spacy/tokens/morphanalysis.pyx | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 spacy/tokens/morphanalysis.pyx diff --git a/spacy/tokens/morphanalysis.pyx b/spacy/tokens/morphanalysis.pyx new file mode 100644 index 000000000..df2d6ec20 --- /dev/null +++ b/spacy/tokens/morphanalysis.pyx @@ -0,0 +1,57 @@ +cdef class Morphanalysis: + """Control access to morphological features for a token.""" + def __init__(self, Vocab vocab, features=None): + pass + + @classmethod + def from_id(self, Vocab vocab, hash_t key): + pass + + def __contains__(self, feature): + pass + + def __iter__(self): + pass + + def __len__(self): + pass + + def __str__(self): + pass + + def __repr__(self): + pass + + def __hash__(self): + pass + + @property + def is_base_form(self): + pass + + @property + def pos(self): + pass + + @property + def pos_(self): + pass + + @property + def id(self): + pass + + def get(self, name): + pass + + def set(self, name, value): + pass + + def add(self, feature): + pass + + def remove(self, feature): + pass + + def to_json(self): + pass