Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Perl and Linguistics

by mattr (Curate)
on May 26, 2002 at 14:41 UTC ( #169394=note: print w/replies, xml ) Need Help??

in reply to Perl and Linguistics

Sounds like a great idea as I mentioned in some other threads. There are some morphological softwares in Perl like EMERGE and FLEMM at the Natural Language Software Registry in Germany, search for "perl". That db is heavier on Java however there are initiatives for linguistics in both perl and java. Some systems have apis for both languages, like WordNet which has lots of other interfaces too.

I have used C++ based tools on linux for Japanese morphological analysis, such as chasen. Such tools are critical in Japanese and are used in indexing for a search engine (link), basically C++ is needed for speed in that case. Perl will let you develop more quickly and you can later roll time-sensitive functions in C/C++, or make a Perl API to some C++ tool if you need it.

Actually why not just search with terms "perl" and "linguistics", or "computational linguistics". You will see that you are not alone, and may find some work. Computational linguistics courses seem to use Perl often. This page at Ohio State, Languages for computational linguistics, notes that Perl is phenomenally popular in the field and Java plays catch-up to Perl's feature set. It says, "Most work in industry is done in Perl and C++; Java can be expected to have a growing role as time goes on."

There is also a page about how Perl was designed based on linguistics principles, and the document has the same title as this thread.. Perl & Linguistics.

To be fair, Perl is not the only one on the block and it may even be that more java things are being created than perl things. But from what I can see Perl is the natural match to linguistics and the CPAN is a great way to share that work and see it used by many people. Otherwise you may like to check out Prolog, Haskell, and tools/languages used in knowledge engineering.

Replies are listed 'Best First'.
Re: Re: Perl and Linguistics
by doonyakka (Beadle) on May 26, 2002 at 15:54 UTC

    Many thanks for some very helpful replies. Looks like there's some excellent work being done in this field. For some time now, I've been thinking of different ways of implementing various methods, including stochastic processing la Markov and more recent models like Rens Bod's Data Oriented Parsing

    The OpenNLP Grok Library looks interesting; mainly for Java. I'm somewhat familiar with Prolog but I'm interested in combining Perl's unequalled data munging capabilites with more sophisticated modelling applications.

    Looks like there's a lot of hard but fun work ahead!


Re: Re: Perl and Linguistics
by Hanamaki (Chaplain) on May 26, 2002 at 16:21 UTC
    I have used C++ based tools on linux for Japanese morphological analysis, such as chasen. Such tools are critical in Japanese and are used in indexing for a search engine ...

    While I use Chasen -- which has by the way some rudimentary Perl bindings -- almost everday I am curious wether Chasen is really a good choice for a search engine? Thinking about speed, the difficulties to update Chasen's dictionary and to tune it for specific (topic) domains it would be nice to hear more about your experience with Chasen.

    For simple search engines I usually prefer a simple longest match algorithm as provided by Kakasi or my own tools.
      Sorry I do use kakasi as main tool in search engine now. But I use chasen sometimes for individual documents since I am under the impression that it is slower, more flexible, more sophisticated. I just mentioned Chasen because I remembered Nara and clustering, and that gave me chasen.

      For those who are not familiar with either tool, they are morphological analyzers of Japanese text. They are similar, though and generally are used to split a chunk of text into individual words (Japanese words are not usually separated by spaces) and to get the phonetic reading of those words (usually in roman alphabet).

      Obviously this is enabling technology. The name of Kakasi in fact is a kind of palindrome, in that read backwards phonetically you get the name of a popular front end processor which will take roman alphabet input and interactively pick the correct characters based on that phonetic reading and the context.

      I believe Kakasi is focussed more on workaday speed and useability while chasen might be more flexible. In particular there is some interesting use of chasen in document clustering work done in Nara and elsewhere I seem to remember. Couldn't find the exact page but google will help you look at the field. Personally where I use these tools is in custom search engines I build, usually either completely in Perl or with plugins from projects like the above. They are mainly useful it seems in building an inverted index to search a lot of text quickly but I have a small (a few megabytes) Japanese database that works fine just with (Japanese) regexes.

      I think it would be very interesting if Perl programmers could easily use state of the art computational linguistics or "A.I." algorithms (besides I guess what are already in perl) to make perl even more intelligent and perhaps automate some of the programming task. For example someone just gave me three nasty scripts to refactor together and update for 5.6.1, maybe perl could learn to tell me "Yep, those are real nasty scripts, better rewrite from scratch," or perhaps give me other insights into the code.

      I am no a computational linguist, just interested. There is an awful lot of science there, so if anybody has insights about it please share with the rest of us.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://169394]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2023-05-28 13:51 GMT
Find Nodes?
    Voting Booth?

    No recent polls found