forkinpm: -------------------------------------------------------------------------------- Hallo! I have seen that the editor PSPad is equipped with a scripting capability and thatmany users have added very useful scripts to the samples base available. Does anyone know of a script to add Parts-of-Speech tags to words in a sentence with the tags having been looked up in a user's dictionary. I am building a fully tagged English to German dictionary and will use it with such a script. So does any member have one or know how to write one? Which is the best tool for such a script? The dictionary is in CSV format. I hope to have any help and guidance anyone can offer me. Thanks and regards, forkinpm. --------------------------------------------------------------------------------
Hi, I don't know of any available pspad script for this kind of tasks; depending on your requirements, it might be possible to get some basic functionality. How does your POS dictionary look like, which tagset and format is to be used and what logic is supposed adapted? I currently can think of the most simple approach, where you lookup the exact word form and simply assign the obtained POS value (or nothingin case of no match). Ie. you could generate a word list of the input text and search for each word in another text containing actually the dictionary. The size of the texts should be tested to see, whether the performance is reasonable. The function would be really simple, something like the following: input_text = "How are you?" dict_text = "How;adverb be;verb am;verb are;verb is;verb was;verb were;verb I;pronoun you;pronoun he;pronoun she;pronoun it;pronoun ...;..." // search and lookup functions ... output_text = "<word pos="adverb>How</word> <word pos="verb>are</word> <word pos="pronoun>you</word>?" I guess, a more advanced heuristics, inflection or word formation handling (not to mention the disambiguation of homonyms etc.) is beyond the possibilities of such a script, as it requires at least complete program (for German e.g. Morphy http://www.wolfganglezius.de/doku.php?id=cl:morphy or some more powerful systems. hth vbr -- <http://forum.pspad.com/read.php?2,51354,51362> PSPad freeware editor http://www.pspad.com
