プレイ日記
KuroHana elijahpwg
How would I make a translator similar to google translate? I know english, french, and japanese... I just need the code to detect the words without detecting every phrase possible you could write.
1そうだね
プレイ済み
返信[1]
親投稿
MrGlass Pie-ManDan
Yeah... you would need to enter the whole dictionary, plus grammer laws
1そうだね
プレイ済み
返信[2]
親投稿
KuroHana elijahpwg
How do I detect the order of the words I put in? Also... that comment wasn't that helpfull...
2そうだね
プレイ済み
返信[3]
親投稿
MrGlass Pie-ManDan
Each word as a variable would prob do it
0そうだね
プレイ済み
返信[4]
親投稿
Pkyoshi19 Pokeyoshi19
>"I know english, french, and japanese" So I'm not the only one...? *-* Okay, so make the program do this: -Ask for a sentence in one language -Detect the language -Ask for the language you want to translate to -Save every word from the sentence in an array -Translate every word in the array -Rebuild the sentence It shouldn't work very well; Japanese and English are very different...
1そうだね
プレイ済み
返信[5]
親投稿
Pkyoshi19 Pokeyoshi19
To answer your question, to detect words, you have to use commands like MID$(), LEN(), and a FOR loop. You should make it scan the sentence from left to right: whenever it encounters a space, make it save in an array everything it scanned between the last space and the one it just found. I know it sounds complex (and it is), but if you can understand three languages, you can understand this. :P
1そうだね
プレイ済み
返信[6]
親投稿
KuroHana elijahpwg
Can you put that into code XD
0そうだね
プレイ済み
返信[7]
親投稿
Pkyoshi19 Pokeyoshi19
I'm currently writing a program for you, I should release it in a few days.
0そうだね
プレイ済み
返信[8]
親投稿
KuroHana elijahpwg
On CHRISTMAS??? or today
0そうだね
プレイ済み
返信[9]
親投稿
KuroHana elijahpwg
I only probably need 1 thing to translate when you give it to me... so like If it detects "CAT" then it PRINT"NEKO ";
0そうだね
プレイ済み
返信[10]
親投稿
Pkyoshi19 Pokeyoshi19
Wait; you wouldn't want it to translate sentences? ...At all? WELL, 'looks like my program will take much less time to finish. I should release it tonight (if you don't need it to translate sentences, of course. That is much more complex, because it requires grammatical rules and such).
0そうだね
プレイ済み
返信[11]
親投稿
KuroHana elijahpwg
I WANT SENTENCES!!!
0そうだね
プレイ済み
返信[12]
親投稿
Pkyoshi19 Pokeyoshi19
Good, that means I won't have to erase 50+ lines of code :3
0そうだね
プレイ済み
返信[13]
親投稿
Pkyoshi19 Pokeyoshi19
[YKKNX4J6] There it is! Err, I really only did the necessary. I couldn't find out how to make it detect which word is the subject and which one is the object, so sentence translation in Japanese gets messy very quickly. I hope you make attempts on your own and find out how to do it for me. This project is getting interesting.
0そうだね
プレイ済み
返信[14]
親投稿
KuroHana elijahpwg
THX SO MUCH!
0そうだね
プレイ済み
返信[15]
親投稿
KuroHana elijahpwg
Wait, whats aimer?
0そうだね
プレイ済み
返信[16]
親投稿
KuroHana elijahpwg
OH I SEE! Aimer is like in french. for some reason its putting the french into the english??
0そうだね
プレイ済み
返信[17]
親投稿
KuroHana elijahpwg
into the japanese* CX
0そうだね
プレイ済み
返信[18]
親投稿
KuroHana elijahpwg
Wait no comme is like in french... IM CONFUSED
0そうだね
プレイ済み
返信[19]
親投稿
KuroHana elijahpwg
this makes no sense :l
0そうだね
プレイ済み
返信[20]
親投稿
Pkyoshi19 Pokeyoshi19
I told you already lol; I didn't understand how to find the subject in a sentence so I purposely forced the object in the japanese sentence to be "ringo". I'm pretty sure that if we think hard enough we could find out how. (But for now, I'm taking a break. You should try to add your own stuff to the translator to improve it!)
0そうだね
プレイ済み