单词词典库 AS3
1) 是否有为 AS3 构建的公共库/SWC,其中包含单词列表、它们的定义以及用于搜索单词的功能?
2)如果没有,我一直在网上寻找公共单词词典。有没有一个“最佳”单词列表?添加新单词时会更新的一个?
另外,我发现了一个没有颜色但有颜色的单词列表 - 我更喜欢同时具有这两种颜色的列表,因为它们都是可以接受的。
- 另外,如果没有任何包含内置单词列表的 as3 库,如果我要通过我的代码在本地加载一个单词列表,那么最好的存储方式是什么?
我在想,只需循环遍历单词列表中的所有单词,并将它们作为元素添加到 Dictionary
对象中 - 键是单词字符串,值可能是定义。查找的时间复杂度为 O(1),对吗?我之所以问这个问题是因为我知道有些人已经造了树,但是那不是需要时间来遍历吗?
谢谢
1) Are there any public libraries/SWCs built for AS3 that includes a list of words, their definitions as well as functions to search for words from?
2) If not, I've been looking on the web for public dictionary of words. Is there one "best" word list? One that updates when new words are added?
Also, i found a word list that didn't have color but had colour - I'd prefer to have the lists that have both since they both are acceptable.
- And also if there isn't any as3 libraries that include built in word lists, if I were to load one in locally through my code, what would be the best way of storing?
I was thinking that just looping through all the words in the word list and add them as an element to a Dictionary
object - a key being the word string and value maybe being the definition. Lookups would be O(1) right? The reason why I'm asking is because I know some people have built trees but wouldn't that take time to traverse?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哈希表非常适合于此。
Flash 中的 Dictionary 对象在某种程度上是一个哈希表。但只是接受任何东西作为密钥。
有这个http://labs.adobe.com/technologies/squiggly/
但不确定它能做什么。
只是一个通知:
虽然 Color 和 Color 都是正确的,但每个国家的“正确”一词仍然不同。 (美国 - 英国)。
Hash tables are very suited for this.
The Dictionary object in flash is somewhat a hash table. But instead just accepts anything as a key.
There is this http://labs.adobe.com/technologies/squiggly/
Not sure what it can do though.
Just a notification:
While Color and Colour are both correct, the "correct" word is still different for each country. ( US - UK ).