def semantics(self, match): author = NameOf(IsPerson() + AuthorOf(match.book)) return author, "literal"
def semantics(self, match): name = match.words.tokens return IsPerson() + HasKeyword(name)
def semantics(self, match): actor = NameOf(IsPerson() + StarsIn(match.movie)) return actor, "enum"
def semantics(self, match): actor = IsPerson() + StarsIn(match.tvshow) name = LabelOf(actor) return name, "enum"
def semantics(self, match): director = IsPerson() + DirectorOf(match.movie) director_name = NameOf(director) return director_name, "literal"