2011-09-14 7 views
3

최근에 나는 약간의 인공 지능 가능성에 대해 조사하고 있었고, 재미있는 개념 인 것처럼 보이는 babel-lang에 관해 알았다.English to babel-lang

프로젝트가 포기 된 것처럼 보이지만 그 개념은 매우 흥미 롭습니다. 영어로 된 번역기와 좋은 명세를 제공하고 있지만, 그럴 수있는 방법은 없습니다.

영어> 바벨 번역기 제작 방법에 대해 궁금합니다.

제가 생각할 수있는 유일한 방법은 동사를 명사, 형용사 등으로 묶어서 문장을 바벨로 번역하는 것입니다.

이것이 실제로 유일한 (또는 최선의) 방법입니까?

답변

2

바벨은 저의 작은 프로젝트입니다. 오랫동안 프로젝트에 수행 된 작업이 없었던 것은 맞습니다. 나는 아직도 그것을 다시 집어 들기를 바란다.

영어 -> 바벨 번역기가 아주 좋을 것입니다. 그런 프로젝트를보고 싶습니다. 그러나 문제의 어려움은 자연 언어 처리의 전부입니다. 이론적으로 NLP 구문 분석 엔진을 출력하여 바벨을 출력 할 수 있습니다.

바벨 프로젝트의 핵심은 "문제를 깨끗하게 구분하는 것"입니다. 사용자가 진정으로 의미하는 바코드 코드 (babel code)를 작성하게함으로써 NLP 문제에 대해 걱정할 필요가 없으며 대신 생각을 만들고 조작하는 실제 문제에 집중할 수 있습니다.

브라이언

+0

내가 프로젝트 : 바벨 코드가 사용자의 컴퓨터에 대한 이해하기 쉬운하지만 좋아, 거의 모든 언어는 그들이에 사용되는 하나가 '아닌 다른 사용자 친화적 인 '. 그래서 나는이 질문을 올렸다. – Johan

0

그래서 실제로 바벨 번역기로 영어를 만들기 위해 시작했습니다 그것은 꽤 잘거야. 나는 그저 몇 시간 만 보냈고 이미 테스트 예제 문장의 3 분의 1을 완벽하게 작동합니다.

저는 Penn Treebank 형식의 영문 문장을 생성하는 OpenNLP 파서 (SharpNLP 포트)를 사용했습니다. 그런 다음 바벨을 만들기 위해 걸어갑니다.

지금은 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))) (. .))) 
+0

나는 아직도 관심이있다. 어떤 언어로 만들었습니까? – Johan

+0

모두 C#으로되어 있습니다. 프로젝트 사이트를 업데이트했으며 코드의 새 버전을 곧 게시 할 예정입니다.자세한 정보는 http://babelproject.com/blog/에서 블로그를 확인하십시오. –