Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为这个基本问题道歉,因为我对这个话题很陌生。
conlltags = [(word, pos, chunktag) for ((word,pos),chunktag) in zip(sentence, chunktags))]
您能否按照下面给出的格式破解上面的代码:
for i in exampleSentence: letterByLetter = i print(letterByLetter)
我知道的最简单的形式:
conlltags = [] for i in range(min(len(sentence), len(chunktags))): conlltags.append((sentence[i][0], sentence[i][1], chunktags[i]))
我认为您最好查找以下主题:
zip()
这将使您更好地了解正在发生的事情,并且在您未来的一个项目中使用它非常有用!