如何创建单词对列表
我想从单词列表中创建一个由制表符分隔的单词对列表。我认为一种选择可能是创建一个带有“范围”的矩阵,因为我希望将所有单词相互组合。我需要单词对列表来进行进一步分析。
从单词列表:
mama
papa
sister
brother
应该是输出
mama papa
sister brother
mama sister
papa sister
brother mama
等等......
有人知道最好的方法是什么?
I want to create a list of word pairs, separated by tabs, from a word list. I think one option could be to create a matrix with "range" because i want to have all words combined with each other. I need the list of word pairs to make further analyses.
From a word list:
mama
papa
sister
brother
should be the output
mama papa
sister brother
mama sister
papa sister
brother mama
and so on....
Someone who knows what would be the best way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
印刷
prints
请注意排列的使用,我认为这可能是您所要求的。
Note the use of permutations which I think is what you may be asking for.