def parse_candidates(self, result):
        completion = {'dup': 1}
        _type = ""
        word = ""
        placeholder = ""

        for chunk in [x for x in result.string if x.spelling]:
            chunk_spelling = chunk.spelling

            if chunk.isKindTypedText():
                word += chunk_spelling
                placeholder += chunk_spelling
                continue

            elif chunk.isKindResultType():
                _type += chunk_spelling
            else:
                placeholder += chunk_spelling

        completion['word'] = word
        completion['abbr'] = completion['info'] = placeholder

        completion['kind'] = ' '.join(
            [(index_h.kinds[result.cursorKind]
              if (result.cursorKind in index_h.kinds)
              else str(result.cursorKind)), _type])

        return completion
dataset/ETHPy150Open zchee/deoplete-clang/rplugin/python3/deoplete/sources/deoplete_clang.py/Source.parse_candidates/original