Today, I spent a day programming with ZY and discussed many issues. This article mainly discusses the open and real-time basic features of the dictionary.
<Br/>
<Br/> The following is a basic description of these two features:
<Br/>
<H2> what?
</H2>
<H3> 1. Openness
</H3>
<P> a registered user can submit his/her own vocabulary explanations in the searched words. This interpretation will be submitted to the dictionary audit team, which will be reviewed and submitted by the audit team's staff.
</P>
<P> for example, if Daniel queries the word beyond, but has his own understanding of the word, he can submit it to the audit team.
<Br/>
</P>
<H3> 2. Real-time performance
</H3> when a new vocabulary definition is approved by the audit team, it will be added to the dictionary.
<Br/>
<Br/> for example, if Daniel submits a beyond definition and the audit team approves the submission, the new definition is appended to the beyond word in the dictionary.
<Br/>
<Br/>
<H2> Why?
</H2> considering the authority of the dictionary, it is very difficult to completely open the dictionary. The most difficult part is the maintenance of the dictionary.
<Br/>
<H3> 1. If the user maintains his/her own dictionary, it is easy to cause too many useless words in the dictionary, or even the dictionary is invalid.
</H3>
<H3> 2. It is reviewed by dedicated reviewers, with a heavy workload
</H3> weigh the pros and cons and we chose the practice of being reviewed by a dedicated reviewer.
<Br/>
<Br/>
<H2> how?
</H2>
<P> there are two types of word libraries:
</P>
<H3> 1. query the dictionary
</H3>
<P> All query requests submitted by the user are concentrated in this dictionary. If the dictionary does not contain the words to be searched, the words are not found. The words in this dictionary are <font style = "font-weight: bold;" size = "2"> repeated words </font>.
<Br/>
</P>
<H3> 2. dictionary to be reviewed
</H3> <font style = "font-weight: bold; "size =" 3 "> New Words </font> or <font style =" font-weight: bold; "size =" 3 "> added <span style =" font-weight: bold; "> </span> </font> to the dictionary, wait for the reviewer's review. If the word is approved, add the word <font style = "font-weight: bold;" size = "2"> query dictionary: </font> <font style = "font-weight: bold;" size = "3"> New Words </font> Create a new vocabulary record; after <font style = "font-weight: bold;" size = "3"> adding existing vocabulary definitions </font> is attached to the definition of this vocabulary. Similarly, the words in this dictionary are also <font style = "font-weight: bold;" size = "2"> not repeated </font>.
<Br/>
<Br/>
<H3> 3. Storage of lexicon
</H3> whether it is <font style = "font-weight: bold;" size = "2"> querying the dictionary </font> or <font style = "font-weight: bold; "size =" 2 "> dictionary to be reviewed </font> all use database storage. After testing, a dictionary of million words can be searched within 3-4 s. If you create a cache service, the efficiency can be ensured.
<Br/>
<Br/>
<H2> XML ?!
</H2> currently, vocabulary files in XML format are used as core interchange file formats. For example, the vocabulary records returned from <font style = "font-weight: bold;" size = "2"> query dictionary </font> are directly transmitted to the Web interface in XML format, it is displayed after being parsed by the Web server. The words provided by <span style = "font-weight: bold;"> other word websites/services </span> are converted to XML format, and save it to the <font style = "font-weight: bold;" size = "2"> dictionary to be reviewed </font>.
<H2> & nbsp;
</H2>
<H2> Implementation
</H2>
<H3> 1. osgi framework
</H3> the entire application uses osgi as the underlying framework and is built with <span style = "font-weight: bold;"> service-oriented Component Model </span>. In this way, the module can be well modularized to minimize coupling and lay a solid foundation for <span style = "font-weight: bold;"> future expansion </span>.
<Br/>
<Br/>
<H3> 2. Basic query dictionary Construction
</H3> basic <font style = "font-weight: bold; "size =" 2 "> query dictionary </font> by <a href =" http://stardict.sourceforge.net/Dictionaries.php "> <span style =" color: RGB (0, 0,255 ); "> stardict dictionary </span> </a> is converted to an English-Chinese dictionary with million words, which takes 5 hours.
<Br/>
<Br/>
<H3> 3. query Cache
</H3> because of the large vocabulary, the cache is <font style = "font-weight: bold;" size = "2"> required </font>. However, it is still in the research stage.
<Br/>
<H2> another idea ....
</H2> after determining the preceding scheme, you can choose one of the following schemes:
<Br/> 1. each user has his/her own dictionary. Each word in the dictionary has a <span style = "font-weight: bold;"> score </span>
<Br/> 2. query words from all user dictionaries
<Br/> 3. display the vocabulary explanations of each user in descending order by vocabulary <span style = "font-weight: bold;"> score </span>
<Br/> 4. You can <span style = "font-weight: bold;"> score words </span>
<Br/> 5. You can submit modifications to a vocabulary, which is reviewed by the owner of the vocabulary.
<Br/>
<Br/> This solution is based on <font style = "font-weight: bold; "size =" 2 "> vocabulary rating </font> and <font style =" font-weight: bold; "size =" 2 "> open vocabulary review </font>.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service