It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Need me a chr(257) ... need more than 256 unique characters.

Moderator: dafunkymunky

Need me a chr(257) ... need more than 256 unique characters.

Postby Philyuko on Thu May 31, 2007 3:58 pm

For reasons I'd rather not get into, I need more than 256 unique characters. I don't have to see them, I just need to compare them, and they can only be one character long.

Thus, I can compare chr(2) to chr(5) and though they LOOK the same, they will be different. So, everything is fine if I have only 256 unique pieces of information ... but I have around a 1000 ... or more.

So ... I need some way to get a unique character in addition to the 256 that chr provides. For example, Chinese characters would work ... (I think) ... how would I get hold of them though?

Thoughts?
Philyuko
 
Posts: 3
Joined: Thu May 31, 2007 3:15 pm

Postby fred666777 on Sat Jun 02, 2007 12:10 am

...........idk but you can try FreeTranslations.com if you want if thats waht your looking for
fred666777
 
Posts: 9
Joined: Mon May 28, 2007 3:54 am

Postby sgp3213 on Sat Nov 03, 2007 9:31 pm

Why do they have to be characters? What is its use in a program? I know thats being a bit nosy but with the information you've provided, I do not know how i can help you...
sgp3213
 
Posts: 5
Joined: Sat Nov 03, 2007 8:36 pm

Postby Philyuko on Sat Nov 03, 2007 10:27 pm

Hey - nice of you to be interested ;-)

I have solved the problem now - so let me explain a little more.

I was writing a program that evaluated the continuity of text, by sentence. That is, the degree to which one sentence overlapped with the other in terms of similar words. By giving each word an individual character I was able to use minimum edit distance evaluation to create an overlap score. As long as there were relatively few (i.e. < 255 words) I could give each individual word type a unique character. For more than 255 words I had a problem.

Now - I know there were other ways to do this - but that would have meant going back and rewriting a great deal of text - and I didn't want to do that - I had no time.

Either way - what I did in the end was simply use a character for each pair sentences: thus, sentence 1 and 2; sentence 2 and 3; sentence 3 and 4 - and so on. Obviously, this meant that I had plenty of charachters to play with. And the program worked fine and I got my evaluations.

Make sense?
Philyuko
 
Posts: 3
Joined: Thu May 31, 2007 3:15 pm

Postby sgp3213 on Sat Nov 03, 2007 10:33 pm

yes BUT personally i dunno if that solution is the best... It matches sentences instead of words now and kinda changes the purpose i guess. It depends cuz like for example.

I wanted a sandwich from Bob
I wanted a sandwich from Jane

are very similar but wont have any matchups in the way you did it.

Well, i guess i dont need to add ne more since ur done XD
sgp3213
 
Posts: 5
Joined: Sat Nov 03, 2007 8:36 pm

Postby Philyuko on Sun Nov 04, 2007 3:09 am

No ... it does match words

I wanted a sandwich from Bob
I wanted a sandwich from Jane

would become

a b c d e f
a b c d e g

making a edit distance of 2 (i.e., g becomes nothing, nothing becomes f = cost of 2; all others cancel out)

I change each sentence pair to characters.

In the next sentence

"I didn't get a sandwich"

I would use the last previous sentence "I wanted a sandwich from Jane" and start the character sequence again - because the previous characters can now all be recycled.

It would have been quicker if I could have just applied all characters through the text from the start, but this way is fine too because ultimately I had to compare sentences anyway. I think it costs about a second in processing time even when the text is very large - no big deal for what I was doing.
Philyuko
 
Posts: 3
Joined: Thu May 31, 2007 3:15 pm


Who is online

Users browsing this forum: No registered users and 3 guests