Idiom Database Updates







It took awhile, but I’ve finally written Roy’s Tag Cloud into the Idiom Database page!

I’ve configured it to show 60 random keywords each time the page is loaded. There are two reasons for limiting it this way: one is that it looks better, more than 60 gets too crowded; the second is that with all keywords (only 200 or so for the 80 idioms currently entered) it runs far too slowly, which does not give a good effect.

As there are not so many keywords in there yet, one will sometimes get a cloud that consists of keywords that are all the same size. This is because the random selection of keywords all have the same count (probably 1), which will mean that they will be given identical font sizes. As more keywords are added, and more idioms are tagged with keywords that already exist, this situation will become less likely.

In the future I’d really love to change this cloud to display idioms by the number of times each idiom has been viewed. There are two barriers that would need to be overcome before this could happen though: the tag cloud cannot currently display Chinese characters*, and I haven’t written the code to record each time an idiom is viewed. Coding that is simple in theory, but (probably because of the convuluted code I’ve writted) it proved to be impossible for me. I’ll have to rewrite the database pages after exams.

You’ve finished reading - go over to the
Database and add an idiom!

*There are actually a lot of Chinese keywords, but they don’t get displayed. The flash cloud still includes them, and if one moves the mouse about within the cloud’s boundaries one will occasionally come across a “blank square” keyword - if this happens, congratulations! You’ve located a Chinese keyword.

 Subscribe in a reader

at Subscribe by Email

Been a Long Time...




It sure has been a long time since I posted here.

I’ve been busy... Though I can’t say this semester has been horrible, I can’t say it has been very enjoyable, either. Being reminded that I had a COMP paper remaining, after coming back from our wonderful trip to China was not fun. That paper is very very hard, and makes me stressed. Even after completing an assignment, I am not sure what we were meant to do. My assignments tend to pass the required tests, however, regardless of their creators lack of understanding. I have one more assignment left for this paper, and I hear from the lecturer that it is “not going to be easy”. I think he was implying that the previous 5 assignments have been easy. I assure you, they were not. I shudder to think what hideous task he has waiting for us. He really makes work for himself, when he gives me such difficult work. He must know that I will be emailing him every half hour with (what would be to him, I guess) inane and obvious questions. Questions like:

So the binary "whatchamacallits" for each index could be:

000
010
100
110
001
011
101
111

Right?

This would let "us" know which of the variables were true for each index, and allow "us" to do our thing?

Is this at all correct?

Am I getting closer?

Mike

Actually, that is less desperate than normal. He answers them promptly, and I usually find the comments helpful.

Though I don’t like the paper, I don’t mind being forced to complete it (it is a compulsory for my major), as it makes other, non AI related programming seem like actual fun. For example, this weekend I created The Chinese Idiom Database, partly because I wanted to learn how to use MySQL & PHP, and partly because the other idiom databases I could find were ... somewhat lacking. One of them appeared initially promising, returning a good number of idioms for my search “orange”, but it fell over when I selected an idiom to view. The idiom’s information was presented in some encoding that my browser doesn’t understand:

Pasted Graphic
This may, or may not be their fault. Whatever, I can’t use their database. There were one or two others, but either the layout or the search method were seriously flawed.

Mainly I wanted to make my own.

You can find it by clicking on the “Idiom DB /
成语资料库” link in the sidebar.

I’d say I enjoyed about 15% of the creation process. The rest was extremely frustrating. Prior to creating the database and associated pages, I knew NOTHING about MySQL or PHP. This meant that any error I got didn’t make sense to me, and help (in the form of Google) would more often than not confuse the crap out of me. I found two great tutorials, and combined with the excellent W3Schools site, I managed to throw together what you’ll see, if you’d only
CHECK IT OUT!

The tutorials are: a
MySQL tutoral, a short tutorial on how to create a login/registration area, and W3Schools.

The thing that I like the most about The Idiom Database is that you can create an account and add idioms yourself! I hope that people do, as I know there are a lot of Chinese Idioms out there, and I know I can’t add them all myself. Users can also edit idioms they have entered, or if they have special permissions, can edit any entry. If you think you deserve special permissions, please send me an email! The reason I had to make it so people can only edit their own entries is because I don’t want one bastard to come along and screw it all up by changing all the entries to something rude or nonsensical. If people start entering stupid things, Ill change their account permissions so that any idiom entered by them goes into a moderation queue, waiting for me to OK the entry before it gets displayed with other idioms in search results.

Well, that is all for now, I have to go out. When I get back I’ll let you know about other things that have been going on!

 Subscribe in a reader

at Subscribe by Email