docs: def segment(self, source, language=None):
      """Returns a chunk list from the given sentence.
  
      Args:
        source (str): Source string to segment.
        language (:obj:`str`, optional): A language code.
  
      Returns:
        A chunk list. (:obj:`budou.chunk.ChunkList`)
  
      Raises:
        ValueError: If :obj:`language` is given and it is not included in
                    :obj:`supported_languages`.
      """
      if language and not language in self.supported_languages:
        raise ValueError(
            'Language {} is not supported by NLAPI segmenter'.format(language))
  
      chunks = ChunkList()
      results = tinysegmenter.tokenize(source)
      seek = 0
      for word in results:
        word = word.strip()
        if not word:
          continue
        if source[seek: seek + len(word)] != word:
          assert source[seek] == ' '
          assert source[seek + 1: seek + len(word) + 1] == word
          chunks.append(Chunk.space())
          seek += 1
  
        dependency = None
        if word in _PARTICLES or word in _AUX_VERBS or is_hiragana(word):
          dependency = False
  
        chunk = Chunk(word, dependency=dependency)
        if chunk.is_punct():
          chunk.dependency = chunk.is_open_punct()
        chunks.append(chunk)
        seek += len(word)
      chunks.resolve_dependencies()
      return chunks