最近我正在检查一些人工智能的可能性,并发现了babel-lang,这似乎是一个有趣的概念。
该项目似乎已被放弃,但这个概念非常有趣。 它提供了一个babel>英语翻译和一个很好的规范,但没有办法做对决。
我想知道如何制作英语>巴贝尔翻译。
从我能想到的,唯一的方法是拥有一大堆动词,名词,形容词等,然后可以用来将句子翻译成巴贝尔。
这真的是唯一(或最好)的方式吗?
答案 0 :(得分:2)
巴贝尔是我的小项目。在很长一段时间内没有对项目进行任何工作是正确的。我仍然希望能再次提起它。
英语> babel翻译器会很棒,我很乐意看到这样的项目。但问题的难点在于整个自然语言处理。理论上,可以修改NLP解析引擎以输出babel。
巴贝尔项目的重点是干净地“分解问题”。通过让用户写出他们真正的意思(也就是babel代码),我们不必担心NLP问题,而是可以专注于创建和操纵思想的真正问题。
布赖恩
答案 1 :(得分:0)
所以我实际上已经开始制作一个英语到巴贝尔的翻译,而且进展相当顺利。我只花了几个小时就完成了它,我已经完成了三分之一的测试例句。
我采用了(SharpNLP端口)OpenNLP解析器,它生成了一个Penn Treebank格式化的英语句子解析,然后我走路创建了Babel。
现在可以在http://translator.babelproject.com/EnglishToBabel.aspx使用。请继续尝试。
第一行将是英语句子的回声。第二个是由OpenNLP生成的解析树,最后每个输出的第三行是生成的Babel。
它全部都是用C#构建的。如果您想要它的来源,请告诉我。
SharpNLP解析器很糟糕,并且在示例句子中得到了一些不好的解析。显然它是旧版OpenNLP的一个端口。我可能会切换到斯坦福解析器,它似乎提供了更好的解析结果。解析器准确性的最新技术似乎约为90%。
以下是其当前输出的示例。我正在努力将它连接到互动小说游戏引擎。 :)
The quick brown fox jumped over the lazy dog.
(TOP (S (NP (DT The) (JJ quick) (JJ brown) (NN fox)) (VP (VBD jumped) (PP (IN over) (NP (DT the) (JJ lazy) (NN dog)))) (. .)))
Fox quick brown.jumped- over[Dog lazy]();
A quick brown fox is jumping over the lazy dog.
(TOP (S (NP (DT A) (JJ quick) (JJ brown) (NN fox)) (VP (VBZ is) (VP (VBG jumping) (PRT (RP over)) (NP (DT the) (JJ lazy) (NN dog)))) (. .)))
Fox quick brown.is(jumping(Dog lazy));
You are standing at the end of a road before a small brick building.
(TOP (S (NP (PRP You)) (VP (VBP are) (VP (VBG standing) (PP (IN at) (NP (NP (DT the) (NN end)) (PP (IN of) (NP (DT a) (NN road))))) (PP (IN before) (NP (DT a) (JJ small) (NN brick) (NN building))))) (. .)))
You.are(standing at[End of[Road]] before[Building small]());
Around you is a forest.
(TOP (S (SBAR (IN Around) (S (NP (PRP you)) (VP (VBZ is) (NP (DT a) (NN forest))))) (. .)))
There is a forest around you.
(TOP (S (NP (EX There)) (VP (VBZ is) (NP (DT a) (NN forest)) (PP (IN around) (NP (PRP you)))) (. .)))
is around[You](Forest);
A forest is around you.
(TOP (S (NP (DT A) (NN forest)) (VP (VBZ is) (PP (IN around) (NP (PRP you)))) (. .)))
Forest.is around[You]();
A small stream flows out of the building and down a gully.
(TOP (S (NP (DT A) (JJ small) (NN stream)) (VP (VBZ flows) (PP (PP (IN out) (PP (IN of) (NP (DT the) (NN building)))) (CC and) (PP (IN down) (NP (DT a) (NN gully))))) (. .)))
Stream small.flows();
I ate cheese.
(TOP (S (NP (PRP I)) (VP (VBD ate) (NP (NN cheese))) (. .)))
I.ate-(Cheese);
I will eat cheese.
(TOP (S (NP (PRP I)) (VP (MD will) (VP (VB eat) (NP (NN cheese)))) (. .)))
I.will(eat(Cheese));
My dog ran quickly.
(TOP (S (NP (PRP$ My) (NN dog)) (VP (VBD ran) (ADVP (RB quickly))) (. .)))
Dog.ran- quickly();
See Jane run.
(TOP (S (VP (VB See) (NP (NNP Jane) (NN run))) (. .)))
see(Run);
Joe is tall.
(TOP (S (NP (NNP Joe)) (VP (VBZ is) (ADJP (JJ tall))) (. .)))
Joe.is(tall);
Joe was tall.
(TOP (S (NP (NNP Joe)) (VP (VBD was) (ADJP (JJ tall))) (. .)))
Joe.was-(tall);
Joe is a human.
(TOP (S (NP (NNP Joe)) (VP (VBZ is) (NP (DT a) (JJ human))) (. .)))
Joe.is();
The chickens are running loose today.
(TOP (S (NP (DT The) (NNS chickens)) (VP (VBP are) (VP (VBG running) (S (ADJP (RB loose))) (NP (NN today)))) (. .)))
Chickens*.are(running(Today));
Chickens were running loose.
(TOP (S (NP (NNS Chickens)) (VP (VBD were) (VP (VBG running) (ADVP (RB loose)))) (. .)))
Chickens*.were-(running loose());
Before you go to school, take out the trash.
(TOP (S (SBAR (IN Before) (S (NP (PRP you)) (VP (VBP go) (PP (TO to) (NP (NN school)))))) (, ,) (VP (VB take) (PRT (RP out)) (NP (DT the) (NN trash))) (. .)))
take(Trash);
What is the color of horse that I am riding?
(TOP (SBARQ (WHNP (WP What)) (SQ (VP (VBZ is) (NP (NP (NP (DT the) (NN color)) (PP (IN of) (NP (NN horse)))) (SBAR (WHNP (IN that)) (S (NP (PRP I)) (VP (VBP am) (VP (VBG riding)))))))) (. ?)))
The horse that I was riding died.
(TOP (FRAG (NP (NP (DT The) (NN horse)) (SBAR (WHNP (IN that)) (S (NP (PRP I)) (VP (VBD was) (VP (VBG riding) (VP (VBD died))))))) (. .)))
Is Joe tall?
(TOP (SQ (VBZ Is) (NP (NNP Joe) (NN tall)) (. ?)))
Tall.is();
Where is Joe? Sam ate the oranges.
(TOP (S (SBARQ (WHADVP (WRB Where)) (SQ (VP (VBZ is)) (NP (NNP Joe))) (. ?)) (NP (NNP Sam)) (VP (VBD ate) (NP (DT the) (NNS oranges))) (. .)))
Sam.ate-(Oranges*);
Samson slept.
(TOP (S (NP (NNP Samson)) (VP (VBD slept)) (. .)))
Samson.slept-();
Sit!
(TOP (S (VP (VB Sit)) (. !)))
sit();
Where are you going?
(TOP (SBARQ (WHADVP (WRB Where)) (SQ (VBP are) (NP (PRP you)) (VP (VBG going))) (. ?)))
You were reading this morning.
(TOP (S (NP (PRP You)) (VP (VBD were) (VP (VBG reading) (NP (DT this) (NN morning)))) (. .)))
You.were-(reading(Morning));
The morning of today, you read.
(TOP (S (NP (NP (DT The) (NN morning)) (PP (IN of) (NP (NN today)))) (, ,) (NP (PRP you)) (VP (VBD read)) (. .)))
You.read-();
What were you reading this morning?
(TOP (SBARQ (WHNP (WP What)) (SQ (VBD were) (NP (PRP you)) (VP (VBG reading) (NP (DT this) (NN morning)))) (. ?)))
Whose bike were you using?
(TOP (S (NP (WP$ Whose) (NN bike)) (VP (VBD were) (S (NP (PRP you)) (VP (VBG using)))) (. ?)))
Bike.were-();
You bought the bike that you use.
(TOP (S (NP (PRP You)) (VP (VBD bought) (NP (DT the) (NN bike)) (SBAR (IN that) (S (NP (PRP you)) (VP (VBP use))))) (. .)))
You.bought-(Bike);
May I postpone this assignment?
(TOP (SQ (MD May) (NP (PRP I)) (VP (VB postpone) (NP (DT this) (NN assignment))) (. ?)))
I.postpone(Assignment);
Juanita and Celso worked hard and then rested.
(TOP (S (NP (NP (NNP Juanita)) (CC and) (NP (NNP Celso))) (VP (VBD worked) (ADVP (RB hard) (CC and) (RB then) (VBD rested))) (. .)))
& Juanita & Celso.worked- then();
Tashonda sent e-mail.
(TOP (S (NP (NNP Tashonda)) (VP (VBD sent) (NP (NN e-mail))) (. .)))
Tashonda.sent-(E-mail);
Tashonda sent cards and letters.
(TOP (S (NP (NNP Tashonda)) (VP (VBD sent) (NP (NNS cards) (CC and) (NNS letters))) (. .)))
Tashonda.sent-(Letters*);
Tashonda sent e-mail, cards, and letters.
(TOP (S (NP (NNP Tashonda)) (VP (VBD sent) (NP (NN e-mail) (, ,) (NNS cards) (, ,) (CC and) (NNS letters))) (. .)))
Tashonda.sent-(Letters*);
Tashonda sent e-mail, cards, or letters.
(TOP (S (NP (NNP Tashonda)) (VP (VBD sent) (NP (NN e-mail) (, ,) (NNS cards) (, ,) (CC or) (NNS letters))) (. .)))
Tashonda.sent-(Letters*);
Mrs.
(TOP (NNP Mrs.))
Doubtfire gave the children homework.
(TOP (S (NP (NNP Doubtfire)) (VP (VBD gave) (NP (DT the) (NNS children) (NN homework))) (. .)))
Doubtfire.gave-(Homework*);
Mrs.
(TOP (NNP Mrs.))
Doubtfire gave Tabitha and Samantha quizzes.
(TOP (S (NP (NNP Doubtfire)) (VP (VBD gave) (NP (NNP Tabitha) (CC and) (NNP Samantha) (NNS quizzes))) (. .)))
Doubtfire.gave-(Quizzes*);
I myself prefer basketball.
(TOP (S (NP (NP (PRP I)) (NP (PRP myself))) (VP (VBP prefer) (NP (NN basketball))) (. .)))
& I & Myself.prefer(Basketball);
I prefer basketball myself.
(TOP (S (NP (PRP I)) (VP (VBP prefer) (NP (NN basketball)) (NP (PRP myself))) (. .)))
I.prefer(Myself);
John Calhoun is a coach.
(TOP (S (NP (NNP John) (NNP Calhoun)) (VP (VBZ is) (NP (DT a) (NN coach))) (. .)))
Calhoun.is(Coach);
Johnny painted his old jalopy purple.
(TOP (S (NP (NNP Johnny)) (VP (VBD painted) (NP (PRP$ his) (JJ old) (NN jalopy) (NN purple))) (. .)))
Johnny.painted-(Purple old);
The club elected Tashonda president.
(TOP (S (NP (DT The) (NN club)) (VP (VBD elected) (NP (NNP Tashonda) (NN president))) (. .)))
Club.elected-(President);
The club elected Tashonda as its president.
(TOP (S (NP (DT The) (NN club)) (VP (VBD elected) (NP (NNP Tashonda)) (PP (IN as) (NP (PRP$ its) (NN president)))) (. .)))
Club.elected- as[President](Tashonda);
Man, that hurt! Athletic moves excite the crowd.
(TOP (S (NP (NP (NP (NN Man)) (, ,) (SBAR (WHNP (WDT that)) (S (VP (VBP hurt))))) (. !) (NP (NNP Athletic))) (VP (VBZ moves) (VP (VB excite) (NP (DT the) (NN crowd)))) (. .)))
& Man & Athletic.moves(excite(Crowd));
The little old lady hit the tall and distinguished gentleman.
(TOP (S (NP (DT The) (JJ little) (JJ old) (NN lady)) (VP (VBD hit) (NP (DT the) (JJ tall) (CC and) (JJ distinguished) (NN gentleman))) (. .)))
Lady little old.hit-(Gentleman tall distinguished);
Samson was powerful.
(TOP (S (NP (NNP Samson)) (VP (VBD was) (ADJP (JJ powerful))) (. .)))
Samson.was-(powerful);
Dogsbreath works quickly.
(TOP (S (NP (NNP Dogsbreath)) (VP (VBZ works) (ADVP (RB quickly))) (. .)))
Dogsbreath.works quickly();
Dr.
(TOP (NNP Dr.))
Turveydrop waited patiently and quietly at the door.
(TOP (S (NP (NNP Turveydrop)) (VP (VBD waited) (ADVP (RB patiently) (CC and) (RB quietly)) (PP (IN at) (NP (DT the) (NN door)))) (. .)))
Turveydrop.waited- quietly at[Door]();
Charles is working in the garden.
(TOP (S (NP (NNP Charles)) (VP (VBZ is) (VP (VBG working) (PP (IN in) (NP (DT the) (NN garden))))) (. .)))
Charles.is(working in[Garden]());
Charles is working in the garden by the river.
(TOP (S (NP (NNP Charles)) (VP (VBZ is) (VP (VBG working) (PP (IN in) (NP (DT the) (NN garden))) (PP (IN by) (NP (DT the) (NN river))))) (. .)))
Charles.is(working in[Garden] by[River]());
She felt under the weather.
(TOP (S (NP (PRP She)) (VP (VBD felt) (PP (IN under) (NP (DT the) (NN weather)))) (. .)))
She.felt- under[Weather]();
The screaming crowd watched the bridge falling into the river.
(TOP (S (NP (DT The) (VBG screaming) (NN crowd)) (VP (VBD watched) (S (NP (DT the) (NN bridge)) (VP (VBG falling) (PP (IN into) (NP (DT the) (NN river)))))) (. .)))
Crowd.watched-();
The New Yorker quickly rejected whatever Sarah submitted.
(TOP (S (NP (DT The) (JJ New) (NNP Yorker)) (ADVP (RB quickly)) (VP (VBD rejected) (SBAR (IN whatever) (S (NP (NNP Sarah)) (VP (VBD submitted))))) (. .)))
Yorker new.rejected-();
When the train goes through, the windows rattle noisily and the whole house shakes.
(TOP (S (SBAR (WHADVP (WRB When)) (S (NP (DT the) (NN train)) (VP (VBZ goes) (ADVP (RP through))))) (, ,) (NP (DT the) (NNS windows) (NN rattle)) (ADVP (RB noisily)) (CC and) (S (NP (DT the) (JJ whole) (NN house)) (VP (VBZ shakes))) (. .)))