Difference between revisions of "Bengali and English/Anubadok"

From Apertium
Jump to navigation Jump to search
Line 1,202: Line 1,202:
 
* There are three men in the car = গাড়িতে তিন মানুষ আছে
 
* There are three men in the car = গাড়িতে তিন মানুষ আছে
   
  +
* Our house => আমাদের ঘর
 
* My book => আমার বই
 
 
* Man and Woman => মানুষ আর মেয়েমানুষ
 
* Man and Woman => মানুষ আর মেয়েমানুষ
* Their house => ওদের ঘর
 
 
* Where are you? => তুমি কোথায়
 
* Where are you? => তুমি কোথায়
 
* I could not eat => আমার খাওয়া হলোনা
 
* I could not eat => আমার খাওয়া হলোনা
Line 1,213: Line 1,211:
 
* Where are they? => তারা কোথায়
 
* Where are they? => তারা কোথায়
 
* Where are you? => তুমি কোথায়
 
* Where are you? => তুমি কোথায়
* Your house => তোমাদের ঘর
 
* Your book => তোমার বই
 
 
* I will not go => আমি যাব না
 
* I will not go => আমি যাব না
 
* I want water => আমি পানি চাই
 
* I want water => আমি পানি চাই

Revision as of 13:28, 6 June 2009

Anubadok is an open source English to Bengali MT system developed by G M Hossain, currently in experimental stage.

The program is licensed under GPL. Its accessible from here.

Inflection Rules (BnSondhi.pm)

Legend
  • C Consonant
  • V Vowel
  • _ Any Letter
  • K Kar (Short form of Vowel)
  • G General Rule - The consonants and vowels in the example are exchangeable with any other consonants and vowels
  • S Special Rule - The consonants and vowels in the example are NOT exchangeable with any other consonants and vowels
  • H Hasanth - The joiner, e.g. ঙ+্+গ = ঙ্গ, as in মঙ্গল

__CC means the last two consonants of a word, and CV__ means the first letter of this word is consonant followed by a vowel

Rules

Verb Rules (Applies if the length of the first word is >= 3, rules are not exclusive e.g. one word can qualify for multiple rules)
  • G (C+ো+C)+(তে) = (C+ু+C+তে) e.g. খোল + তে = খুলতে
  • G (া+C+া) + (তে) = (া+C+া+তে) e.g. পাঠা + তে = পাঠাতে
  • G (C+ি)/(C+ে) + (ে+র)্(া+র) = (C+ে+ও+য়+া+র) e.g. নি + ের = নেওয়ার, নে + ার = নেওয়ার
  • G (C+া) + (তে) = (C+ে+তে) e.g. পা + তে = পেতে
  • G (C+ে) + (তে) = (C+ি+তে) e.g. দে + তে = দিতে
  • G (C+C) + (ে+র) = (C+C+া+র) e.g. কর + ের = করার
  • G (__K1) + (K2__) = (__K1__) [needs review]
Preposition Rules

(Applies if the length of the first word is >= 2, rules are not exclusive e.g. one word can qualify for multiple rules)

  • G (ল+ে+C) -> (ল+ি+C) e.g. লেখ -> লিখ
  • G (এ+ই) + (টা) = (এটি) e.g. এই + টি = এটি
  • S (_+ক+ে) + (ে+র) = (_+র) e.g. আমাকে + ের = আমার
  • G (C+C) + (ৈ+র) = (C+C+া+র) e.g. কর + এর = করার
  • G (C/V/H/K + C) + (তে) = (C/V/H/K + C + ে) [needs review]
  • S (ং) + (ে+র) = (ং+এ+র) e.g. সং + ের = সংএর
  • G (__K1) + (K2__) = (__K1__) [needs review]
Main Rules

(Applies if the length of the first word is >= 2, rules are not exclusive e.g. one word can qualify for multiple rules)

  • G (K+C) + (তে) = (K+C+ে) e.g. মার + তে = মারে [need review]
  • G (__K1) + (K2__) = (__K1__) [needs review]
Sondhi for progressive tag POS
  • G (K) + (_) = (K)
Basic Verb Shondhi
  • G (_+ি) + (_) = (_+ে+ও+য়+_)
Verb Shondhi for passive sentence
  • G (C/K + C) + (_) = (C/K+C+_) else
  • G (_+ি) + (_) = (_+ে+ও+য়+_)
Verb Shondhi for active sentence

(Applies if the length of the first word is >= 1, rules are not exclusive e.g. one word can qualify for multiple rules)

  • G (_ে) + (ো) = (_া+ও) e.g. নে + ো = নাও
  • G (C+ে) + (_) = (C+ি+_) e.g. দে -> দি
  • G (ল+ে+C) -> (ল+ি+C) e.g. লেখ -> লিখ [why anubadok repeats this rule?]
3rd person, present simple
  • S (ল+ি+C) + (ে) = (ল+ে+C+ে) e.g. লিখ + ে-> লেখ + ে-> লেখে
  • S (দি) + (ে) = দেয় e.g. দি + ে-> দে + ে-> দেয়
  • G (C/K+C) + (ে) = (C/K+C+ে) else
  • G (_) + (ে) = (_য়) e.g. হ + ে-> হয়, খা + ে-> খায়
2nd person, present simple
  • S (ল+ি+C) + (েন) = (ল+ে+C+ে+ন) e.g. লিখ + েন-> লেখ + েন-> লেখেন
  • G (C/V/ে+C) + (েন) = (C/V/ে+C+েন) e.g. বল + েন = বলেন, চাল + েন + চালেন
  • G (imperative) লিখ + েন -> লিখ + ুন -> লিখুন
  • G (C+K) + (েন) = (C+K+ন) বাড়া + েন -> বাড়ান
1st/2nd/3rd person, future simple
  • G (_+ি) + (ব) = (_+ে+ব) e.g. দি + ব = দেব [This would also pass through other rules for other persons. eg. দেব + েন = দেবেন, from present tense]
1st/2nd/3rd person, past simple
  • S (যা) + (ল/লাম/লেন) = (গা+ল/লাম/লেন)
  • S (গা) + (ল/লাম/লেন) = (গে+ল/লাম/লেন)
1st person, present simple
  • G (ল+ে+C) -> (ল+ি+C) e.g. লেখ -> লিখ
  • S লিখ + ি = লিখি
  • S (খা) + (ি) = খাই
1st/2nd/3rd person, present/past continuous

(CC) + (ছি/ছে) = (CCছি/ছে)(কর) + (ছি/ছে) e.g. করছি/করছে (_K) + (ছি/ছে) = (_K+চ+ছি/ছে) e.g. পড়া + ছি + পড়াচ্ছি

1st/2nd/3rd person, present/past, perfect
  • যা + (ে+ছ+ে/ি)-> গি + (ে+ছ+ে/ি)
  • (C+া+C) + (ে+ছ+ে/ি) -> (C+ে+C) + (ে+ছ+ে/ি)
  • হ + ে + (ে+ছ+ে/ি)-> হয়ে + (ে+ছ+ে/ি)
  • ঘটা + ে + (ে+ছ+ে/ি)-> ঘটা+ি+য়+ে + (ে+ছ+ে/ি)
  • খা+ ে + (ে+ছ+ে/ি)-> খেয়ে + (ে+ছ+ে/ি)

Guideline for regex

Try following this pattern in regex matching:

 -> CCK (e.g. করা) 
   -> KCK (e.g. নাড়া) 
     -> CKC (e.g. কাট/পাড়) 
       -> CC (e.g. কর/পড়) 
         -> CK (e.g. পা/নি/দে) 
           -> C (e.g. ক/হ)

Tag Set

Anubadok uses Penn Treebank Tag Set, the tag set is as follows:

Tag Gloss Example
CC Coordinating conjunction
CD Cardinal number
DT Determiner
EX Existential there
FW Foreign word
IN Preposition or subordinating conjunction
JJ Adjective
JJR Adjective, comparative
JJS Adjective, superlative
LS List item marker
MD Modal
NN Noun, singular or mass
NNS Noun, plural
NP Proper noun, singular
NPS Proper noun, plural
PDT Predeterminer
POS Possessive ending
PP Personal pronoun
PP$ Possessive pronoun
RB Adverb
RBR Adverb, comparative
RBS Adverb, superlative
RP Particle
SYM Symbol
TO to
UH Interjection
VB Verb, base form
VBD Verb, past tense
VBG Verb, gerund or present participle
VBN Verb, past participle
VBP Verb, non-3rd person singular present
VBZ Verb, 3rd person singular present
WDT Wh-determiner
WP Wh-pronoun
WP$ Possessive wh-pronoun
WRB Wh-adverb

Verb Inflection Table

Legend
  • [-] : The surface form is same as lemma
  • [!] : Change in lemma
  • N/A : Not applicable for this person/ form
  • [?] : Not 100% sure :(

Verb: কর (do)

Similar Verbs: পড় (read), পর (wear), নাড় (shake), কাট (cut), উঠ (get up), বল (talk) etc.

কর (do)
1st
2nd
3rd
Verbal noun (present participle/gerund) N/A Polite Familiar More Familiar Polite Familiar
N/A N/A N/A N/A N/A


Infinitive (to do) তে/ ার জন্য N/A N/A N/A N/A N/A N/A
Present simple N/A ি েন [-] িস েন
Present continuous N/A ছি ছেন ছিস ছেন ছে
Future simple N/A বেন বে বি বেন বে
Simple past N/A লাম লেন লে লি লেন
Habitual past (Imperfect) N/A তাম তেন তে তি তেন
Conditional past (... would do) N/A বেন বে বি বেন বে
Continuous past N/A ছিলাম ছিলেন ছিলে ছিলি ছিলেন ছিল
perfect N/A েছি েছেন েছ েছিস েছেন েছে
pluperfect(past perfect) N/A েছিলাম েছিলেন েছিলে েছিলি েছিলেন েছিল
Past participle N/A N/A N/A N/A N/A N/A
Conditional participle লে N/A N/A N/A N/A N/A N/A
Present imperative N/A N/A ুন [-] [-] N/A N/A
Future imperative N/A N/A েন [?] িস N/A N/A
Future Continuous N/A তে থাকব তে থাকবেন তে থাকবে তে থাকবি তে থাকবেন তে থাকবে
(... might have done) N/A ে থাকব ে থাকবেন ে থাকবে ে থাকবি ে থাকবেন ে থাকবে

Verb: করা (make sb do) - Causative of করা (do)

Similar Verbs: পড়া (teach), পরা (make sb wear), নাড়া (shake), কাট (cut), উঠ (get up), বল (talk) etc.

করা (make sb do)
1st
2nd
3rd


Verbal noun (present participle/gerund) ানো N/A Polite Familiar More Familiar Polite Familiar
N/A N/A N/A N/A N/A
Infinitive (to do) াতে/ ানোর জন্য N/A N/A N/A N/A N/A N/A
Present simple N/A াই ান াও াস ান ায়
Present continuous N/A াচ্ছি াচ্ছেন াচ্ছ াচ্ছিস াচ্ছেন াচ্ছে
Future simple N/A াব াবেন াবে াবি াবেন াবে
Simple past N/A ালাম ালেন ালে ালি ালেন াল
Habitual past (Imperfect) N/A াতাম াতেন াতে াতি াতেন াত
Conditional past N/A াব াবেন াবে াবি াবেন াবে
Continuous past N/A াচ্ছিলাম াচ্ছিলেন াচ্ছিলে াচ্ছিলি াচ্ছিলেন াচ্ছিল
perfect N/A িয়েছি িয়েছেন িয়েছ িয়েছিস িয়েছেন িয়েছে
pluperfect (past perfect) N/A িয়েছিলাম িয়েছিলেন িয়েছিলে িয়েছিলি িয়েছিলেন িয়েছিল
Past participle িয়ে N/A N/A N/A N/A N/A N/A
Conditional participle ালে N/A N/A N/A N/A N/A N/A
Present imperative N/A N/A ান াও N/A N/A
Future imperative N/A N/A ান [?] াও [?] াস N/A N/A
Future Continuous N/A াতে থাকব াতে থাকবেন াতে থাকবে াতে থাকবি াতে থাকবেন াতে থাকবে
( ... might have ... ) N/A িয়ে থাকব িয়ে থাকবেন িয়ে থাকবে িয়ে থাকবি িয়ে থাকবেন িয়ে থাকবে

Verb: খা (eat)

Similar Verbs: পা (find)

খা (eat)
1st
2nd
3rd
Verbal noun (present participle/gerund) ওয়া N/A Polite Familiar More Familiar Polite Familiar
N/A N/A N/A N/A N/A
Infinitive (to do) খেতে [!]/ বার জন্য N/A N/A N/A N/A N/A N/A
Present simple N/A য়
Present continuous N/A চ্ছি চ্ছেন চ্ছ চ্ছিস চ্ছেন চ্ছে
Future simple N/A বেন বে বি বেন বে
Simple past N/A খেলাম [!] খেলেন [!] খেলে [!] খেলি [!] খেলেন [!] খেল [!]
Habitual past (Imperfect) N/A খেতাম [!] খেতেন [!] খেতে [!] খেতি [!] খেতেন [!] খেত [!]
Conditional past (... would eat) N/A বেন বে বি বেন বে
Continuous past N/A চ্ছিলাম চ্ছিলেন চ্ছিলে চ্ছিলি চ্ছিলেন চ্ছিল
perfect N/A খেয়েছি [!] খেয়েছেন [!] খেয়েছ [!] খেয়েছিস [!] খেয়েছেন [!] খেয়েছে [!]
pluperfect (past perfect) N/A খেয়েছিলাম [!] খেয়েছিলেন [!] খেয়েছিলে [!] খেয়েছিলি [!] খেয়েছিলেন [!] খেয়েছিল [!]
Past participle খেয়ে [!] N/A N/A N/A N/A N/A N/A
Conditional participle খেলে [!] N/A N/A N/A N/A N/A N/A
Present imperative N/A N/A [-] N/A N/A
Future imperative N/A N/A খেয়েন [!][?] খেও [!] N/A N/A
Future Continuous N/A খেতে থাকব [!] খেতে থাকবেন [!] খেতে থাকবে [!] খেতে থাকবি [!] খেতে থাকবেন [!] খেতে থাকবে [!]
( ... might have eaten) N/A খেয়ে থাকব [!] খেয়ে থাকবেন [!] খেয়ে থাকবে [!] খেয়ে থাকবি [!] খেয়ে থাকবেন [!] খেয়ে থাকবে [!]

Verb: যা (go)

যা (go)
1st
2nd
3rd
Verbal noun (present participle/gerund) ওয়া N/A Polite Familiar More Familiar Polite Familiar
N/A N/A N/A N/A N/A
Infinitive (to do) যেতে [!]/ বার জন্য N/A N/A N/A N/A N/A N/A
Present simple N/A য়
Present continuous N/A চ্ছি চ্ছেন চ্ছ চ্ছিস চ্ছেন চ্ছে
Future simple N/A বেন বে বি বেন বে
Simple past N/A গেলাম [!] গেলেন [!] গেলে [!] গেলি [!] গেলেন [!] গেল [!]
Habitual past (Imperfect) N/A যেতাম [!] যেতেন [!] যেতে [!] যেতি [!] যেতেন [!] যেত [!]
Conditional past (... would eat) N/A বেন বে বি বেন বে
Continuous past N/A চ্ছিলাম চ্ছিলেন চ্ছিলে চ্ছিলি চ্ছিলেন চ্ছিল
perfect N/A গেছি [!] গেছেন [!] গেছ [!] গেছিস [!] গেছেন [!] গেছে [!]
pluperfect(past perfect) N/A গেছিলাম [!] গেছিলেন [!] গেছিলে [!] গেছিলি [!] গেছিলেন [!] গেছিল [!]
Past participle গিয়ে [!] N/A N/A N/A N/A N/A N/A
Conditional participle গেলে [!] N/A N/A N/A N/A N/A N/A
Present imperative N/A N/A [-] N/A N/A
Future imperative N/A N/A যেয়েন [!][?] যেও [!] N/A N/A
Future Continuous N/A যেতে থাকব [!] যেতে থাকবেন [!] যেতে থাকবে [!] যেতে থাকবি [!] যেতে থাকবেন [!] যেতে থাকবে [!]
(.. might have gone) N/A গিয়ে থাকব [!] গিয়ে থাকবেন [!] গিয়ে থাকবে [!] গিয়ে থাকবি [!] গিয়ে থাকবেন [!] গিয়ে থাকবে [!]

Verb: নি (take)

Similar Verbs: পা, দা

নি (take)
1st
2nd
3rd
Verbal noun (present participle/gerund) নেওয়া [!] N/A Polite Familiar More Familiar Polite Familiar
N/A N/A N/A N/A N/A
Infinitive (to do) তে/ নেয়ার জন্য [!] N/A N/A N/A N/A N/A N/A
Present simple N/A নেই [!] নেন [!] নাও [!] নেন [!] নেয় [!]
Present continuous N/A চ্ছি চ্ছেন চ্ছ চ্ছিস চ্ছেন চ্ছে
Future simple N/A নেব [!] নেবেন [!] নেবে [!] বি নেবেন [!] নেবে [!]
Simple past N/A লাম লেন লে লি লেন
Habitual past (Imperfect) N/A তাম তেন তে তি তেন
Conditional past (... would eat) N/A নেব [!] নেবেন [!] নেবে [!] বি নেবেন [!] নেবে [!]
Continuous past N/A চ্ছিলাম চ্ছিলেন চ্ছিলে চ্ছিলি চ্ছিলেন চ্ছিল
perfect N/A য়েছি য়েছেন য়েছ য়েছিস য়েছেন য়েছে
pluperfect(past perfect) N/A য়েছিলাম য়েছিলেন য়েছিলে য়েছিলি য়েছিলেন য়েছিল
Past participle য়ে N/A N/A N/A N/A N/A N/A
Conditional participle লে N/A N/A N/A N/A N/A N/A
Present imperative N/A N/A নাও [!] নে [!] N/A N/A
Future imperative N/A N/A য়েন N/A N/A
Future Continuous N/A তে থাকব তে থাকবেন তে থাকবে তে থাকবি তে থাকবেন তে থাকবে
(.. might have taken) N/A য়ে থাকব য়ে থাকবেন য়ে থাকবে য়ে থাকবি য়ে থাকবেন য়ে থাকবে

Trivia

In Bengali -

  • Verbs do not inflect number. So "I go" - "আমি যাই", "We Go" - "আমরা যাই".
  • Verbs do not inflect gender. So "He goes" - "সে যায়", "She goes" - "সে যায়".
  • Nouns and Adjectives has genders. So "He is an old man" - "সে একজন বৃদ্ধ লোক", "She is an old woman" - "সে একজন বৃদ্ধা মহিলা"
  • Pronouns do not have genders. "He" - "সে", "She" - "সে"

Tests

  • my cat => আমার বিড়াল
  • my cats => আমার বিড়ালগুলো
  • my daughter => আমার মেয়ে
  • my daughters => আমার মেয়েরা
  • my daughter's cat => আমার মেয়ের বিড়াল
  • my daughter's cats => আমার মেয়ের বিড়ালগুলো


  • the boy kicks the ball to the girl =>
  • the girl kicks the ball to the boy =>
  • a man sees a cat => একটি মানুষ একটি বিড়াল দেখে
  • a man sees a cat through a telescope => একটি মানুষ একটি দুরবীন দিয়ে একটি বিড়াল দেখে
  • It is raining = এইটি বৃষ্টি পড়চ্ছে [Wrong]. Right: বৃষ্টি পড়চ্ছে
  • It is Sunday = এইটি রবিবার [Wrong]. Right: আজ রবিবার
  • There are three men in the car = গাড়িতে তিন মানুষ আছে


  • Man and Woman => মানুষ আর মেয়েমানুষ
  • Where are you? => তুমি কোথায়
  • I could not eat => আমার খাওয়া হলোনা
  • Blue eye => নীল চোখ
  • Life and death => জীবন আর মরণ
  • Star studded sky => তারা ভরা আকাশ
  • Where are they? => তারা কোথায়
  • Where are you? => তুমি কোথায়
  • I will not go => আমি যাব না
  • I want water => আমি পানি চাই
  • You speak => তুমি বল
  • Dark night => আঁধার রাত
  • He will go => সে যাবে
  • She will go => সে যাবে
  • I could not go => আমার যাওয়া হলোনা