def surname_is_toponym(self):
        """
        Is the surname the name of a country or US state?

        Returns: bool
        """

        surname = ' '.join(self.surname_tokens)
        return is_toponym(surname)
    def title_is_toponym(self):
        """
        Is the title the name of a country or US state?

        Returns: bool
        """

        title = ' '.join(self.title_tokens)
        return is_toponym(title)
示例#3
0
文件: text.py 项目: davidmcclure/osp
    def surname_is_toponym(self):

        """
        Is the surname the name of a country or US state?

        Returns: bool
        """

        surname = ' '.join(self.surname_tokens)
        return is_toponym(surname)
示例#4
0
文件: text.py 项目: davidmcclure/osp
    def title_is_toponym(self):

        """
        Is the title the name of a country or US state?

        Returns: bool
        """

        title = ' '.join(self.title_tokens)
        return is_toponym(title)