如何为多语言字典创建数据库? [英] How do I go about making the database for a multi language dictionary?

查看:124
本文介绍了如何为多语言字典创建数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果你曾经下载过pleco,那就是我想编程的东西。但是,我想制作一个多语言版本。我想添加日语和韩语。我希望像字典选项卡一样具有相同的功能,将字符划分为显示个别含义,包含该字符的单词以及示例句子。我还想添加同义词和反义词选项卡。



但是我不知道如何让数据库存储每个字符和同义词,句子等等。



我尝试过:



我在线搜索过此类型的字典:



-------------------------------------- --------------------------------



 class StudentName 
{
public string FirstName {get;组; }
公共字符串LastName {get;组; }
public int ID {get;组; }
}

class CollInit
{
Dictionary< int,StudentName> students = new Dictionary< int,StudentName>()
{
{111,new StudentName {FirstName =Sachin,LastName =Karnik,ID = 211}},
{112 ,new StudentName {FirstName =Dina,LastName =Salimzianova,ID = 317}},
{113,new StudentName {FirstName =Andy,LastName =Ruth,ID = 198}}
};
}



------------------------------ -------------------------------------------------- -



但是,这似乎不符合我对匹配语言单词翻译,句子等的需要。



有关如何组织此类数据库的任何建议?请给我看一下视觉示例。



(这将是为android编程的)

解决方案

I可能会有一个表格用于每种语言。

我会有一个多对多的链接表,所以你可以链接语言之间的单词。

我会有一个链接类型表定义类型 - 直接,反义词,同义词等。

您可以考虑链接上的权重,而不是衡量连接的准确性。否定=反义词,正=同义词,零是直接链接。



以上是一个非常简单和僵化的设计,应该有更灵活的方法来做类似的事情此

If you have ever downloaded "pleco", that is what i want to program. But, i want to make a multi language version. I want to add Japanese and Korean. I want the same features like the dictionary tab, have it divide the characters to show individual meanings, words that contain that character, and example sentences. I also want to add a synonym and antonym tab.

But I don't know how to go about making the database to store every character and synonyms, sentences, etc.

What I have tried:

I have searched online and came across this type of dictionary:

----------------------------------------------------------------------

class StudentName
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public int ID { get; set; }
}

class CollInit
{
    Dictionary<int, StudentName> students = new Dictionary<int, StudentName>()
    {
        { 111, new StudentName {FirstName="Sachin", LastName="Karnik", ID=211}},
        { 112, new StudentName {FirstName="Dina", LastName="Salimzianova", ID=317}},
        { 113, new StudentName {FirstName="Andy", LastName="Ruth", ID=198}}
    };
}


----------------------------------------------------------------------------------

however, this doesn't seem to fit my need for matching language word translations, sentences, etc.

Any suggestions on how to organize this type of data base? show me visual example please.

(This is going to be programmed for android)

解决方案

I would probably have a table for each language.
I would then have a many to many link table so you can link words between languages.
I would have a link type table to define the types - direct, antonym, synonym etc.
You might consider a weightage on the link instead to gauge the accuracy of the connection. Negative = antonym, positive = synonym, zero is a direct link.

The above is a very simplistic and rigid design, there should be more flexibly methods of doing something like this.


这篇关于如何为多语言字典创建数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆