处理大型同义词列表的最佳方法

编程入门 行业动态 更新时间:2024-10-04 21:27:43
本文介绍了处理大型同义词列表的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我将为要在免费的Microsoft单词中使用的英语单词制作一个非常大的同义词列表. 我想知道什么是处理此类数据的最佳方法?文本文档的大小最大为12 mb. 我有两个问题: 1.)列表不应保存在文本文件之类的外部文件中,而必须驻留在程序本身(单独的类文件)中. 2.)IAM制造一个文字处理器,所以我希望用户查看所选单词的同义词. 存储带有同义词的单词,然后从列表中检索任何选定单词的同义词的最佳方法是什么? 例如:word1-同义词1. synonym2等 word2-同义词1. synonym2等 word2-同义词1. synonym2等

i am going to make a very large list of synonyms for english words to be used in a free microsoft word. i wanted to know what would be thw best way to handle such a data?? the text document size goes upto 12 mb. I have two problems : 1.) the list should not be saved in an external file like a text document and must reside inside the program itself (a separate class file). 2.) iam making a word processor so i want the user to view synonyms for a selected word. what would be the best way to store the words with their synonyms and then retrieve the synonyms for any selected word from the list? eg : word1 - synonym1. synonym2, etc word2 - synonym1. synonym2, etc word2 - synonym1. synonym2, etc but which collection type would be best suited for this operation?

推荐答案

我希望字典是唯一的选择,每个单词都指向单词列表.我希望使用每个单词的ID来存储它,因此,至少在创建列表的代码中,您不会一遍又一遍地出现相同的单词. 实际上,这是唯一有意义的集合,也许您需要先阅读一些内容,以便了解存在的不同类型的容器,它们的工作方式,它们的优点等等? I would expect a dictionary is the only choice here, with each word pointing to a list of words. I''d expect to store this using ids for each word, so you don''t have the same words appearing over and over again, at least in the code that creates the list. This is in fact the only collection that makes any sense at all, perhaps you need to do some reading first so you understand the different types of containers that exist, how they work, what their strengths are, etc ?

更多推荐

处理大型同义词列表的最佳方法

本文发布于:2023-11-28 03:25:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1640771.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:同义词   方法   列表

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!