@staticmethod
def _is_alphanum(word, valid_punctuation_marks='-'):
    """Check if a word is valid, i.e. it contains only alpha-numeric
        characters and valid punctuation marks.

        Args:
            word (string): a word.
            valid_punctuation_marks (str): punctuation marks that are valid
                    for a candidate, defaults to '-'.
        """
    for punct in valid_punctuation_marks.split():
        word = word.replace(punct, '')
    return word.isalnum()
