Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 26th, 2009, 10:50 PM   #1
secv
Newbie
 
Join Date: Sep 2009
Posts: 4
Rep Power: 0 secv is on a distinguished road
Reading a Text file?

So, I wanted to write a C# translation program, but I have no idea if this is possible, atleast my idea of it.

I wanted to have my dictionary of words, with their corresponding English words. Is it possible in C# to have a user type in an English word, have the program search that file for the corresponding word, then output it for the user?

If this isn't possible, could someone give me some information on what I would want to do to make that possible. Sorry if this is an obvious question, I'm new to C# and don't know what I'm doing.
secv is offline   Reply With Quote
Old Sep 27th, 2009, 9:39 AM   #2
null_ptr0
Young programmer
 
Join Date: Nov 2007
Posts: 139
Rep Power: 0 null_ptr0 is an unknown quantity at this point
Re: Reading a Text file?

Yes, it is possible. Is it practical? No. For one, you're searching a (highly likely) huge text file for the word; not good. Look into using an SQL database, perhaps? (C# has a cool source-level query syntax called LINQ so you can do something like:
var words = from w in xlateDatabaseCtx.Words
                            where w.English == input
                            select w;
...
)
Good luck and have fun in C#!
null_ptr0 is offline   Reply With Quote
Old Sep 27th, 2009, 11:19 AM   #3
secv
Newbie
 
Join Date: Sep 2009
Posts: 4
Rep Power: 0 secv is on a distinguished road
Re: Reading a Text file?

Thank you very much, I'll look into it!
secv is offline   Reply With Quote
Old Sep 27th, 2009, 8:36 PM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 8,368
Rep Power: 19 DaWei will become famous soon enoughDaWei will become famous soon enough
Re: Reading a Text file?

You'll find that translation from one language to another is very rarely a case of word substitution. Very rarely. Do you know two languages? If not, I'd recommend that study a second language for at least a short while.
__________________
Contributor's Corner:
Politically Incorrect
DaWei on Pointers
DaWei is offline   Reply With Quote
Old Sep 27th, 2009, 9:36 PM   #5
secv
Newbie
 
Join Date: Sep 2009
Posts: 4
Rep Power: 0 secv is on a distinguished road
Re: Reading a Text file?

I do know two languages. Though I'm not writing the program for my second language. To be honest, this is just a hobby project I want to see if I can complete. For anyone who has played The Elder Scrolls series, you'll know of the daedric writings scattered across the game worlds. Well I have a few sources that have translated these writings into basic "dictionaries". It has very basic grammar, that I could implement easily if needed. But beyond that, the fact that is is a little known language, and it's never been developed very far as a language, I thought it would be a good choice for doing this sort of project.

I wanted to be able to make this program, because 1) I wanted to see if I could. 2) I thought that if I could complete it, after I finished the translation portion of it, I could build in a functionality that would translate it into the daedric writing. I have a font for this, so... I'll deal with that part, when I get to it, if I get to it. Though that function would be useful for beginning modders, I thought. It would make the mod more realistic to the original. If any of these reasons make sense :p
secv is offline   Reply With Quote
Old Sep 27th, 2009, 11:53 PM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 8,368
Rep Power: 19 DaWei will become famous soon enoughDaWei will become famous soon enough
Re: Reading a Text file?

I don't know anything about fake languages. Your "translation" program might work very well since a fake language by a non-linguist will probably not approach reality. Such a language would tend to duplicate grammar, positional meanings, and a plethora of other things that real languages that are diverse would not adhere to.

I'm not talking about "color" versus "colour."

The differences between languages are very complex. Cultural influences and ways of thinking affect languages to the point where, for some concepts, there is virtually no real, effective translation.

If you're basing an invented (fake) language entirely on another, then word substitution can work very well. It is, after all, nothing more than a (weak) method of encryption.
__________________
Contributor's Corner:
Politically Incorrect
DaWei on Pointers
DaWei is offline   Reply With Quote
Old Sep 28th, 2009, 12:06 AM   #7
secv
Newbie
 
Join Date: Sep 2009
Posts: 4
Rep Power: 0 secv is on a distinguished road
Re: Reading a Text file?

Thats what I was thinking. You hit it spot on. It can't even be considered a language truly, with a word base that's so small. Thanks again for your feedback! Sorry if this has been a stupid question or thread.
secv is offline   Reply With Quote
Old Sep 28th, 2009, 12:26 AM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 8,368
Rep Power: 19 DaWei will become famous soon enoughDaWei will become famous soon enough
Re: Reading a Text file?

It isn't a stupid question. Possibly it's an uninformed question, but most questions are (or there would be no question).

It is, in fact, a subject of great interest (providing that one is interested in subjects of practical use to very few).

Sometimes one can't communicate with a different culture merely because the words are different. Other times it's because concepts are different or missing. The former requires study and practice; the latter requires disconnecting from one culture and immersion in another. One is a task of years and the other is the task of a lifetime.
__________________
Contributor's Corner:
Politically Incorrect
DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading in a Text File zeppelin57 Java 7 Nov 14th, 2008 2:12 AM
Reading text from a file. ShawnStovall C++ 8 May 26th, 2008 4:02 PM
Reading contents of text file then printing out, not working. chillypacman PHP 5 Jun 19th, 2006 6:29 AM
reading a random line from a text file cloud- Visual Basic 11 Apr 8th, 2005 1:34 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 4:12 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:43 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC