View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Daniel Schröer > Lingua-DE-Wortschatz-1.23 > Lingua::DE::Wortschatz



Annotate this POD


New  1
Open  1
View/Report Bugs
Module Version: 1.21009   Source   Latest Release: Lingua-DE-Wortschatz-1.27


Lingua::DE::Wortschatz - webservice client


    use Lingua::DE::Wortschatz;
    my $result=Lingua::DE::Wortschatz::use_service('T','toll');
    for (@lines) {
        print $_->{Synonym},"\n";

    print Lingua::DE::Wortschatz::help('T');
    print Lingua::DE::Wortschatz::help('full');


This is a full featured client for the webservices at The script is a command line client that uses this lib. It is contained in this distribution.

The webservices at provide access to a database of the german word pool. Available services include tools to reduce words to base form, find synonyms, significant neighbours, example sentences and more. All public services at are available. See below for a detailed list.


The following functions can be exported or used via the full name.


Uses the webservice named $name with the arguments @args. Returns undef if not enough arguments for the desired service are supplied. Otherwise it returns a result object (see below).

All public services at are available. Below is a list of service names and their parameters. Any parameter with = is optional and defaults to the given value. Service names can be abbreviated to the shortest unique form.

  * ServiceOverview Name=
  * Cooccurrences Wort Mindestsignifikanz=1 Limit=10
  * Baseform Wort
  * Sentences Wort Limit=10
  * RightNeighbours Wort Limit=10
  * LeftNeighbours Wort Limit=10
  * Frequencies Wort Limit=10
  * Synonyms Wort Limit=10
  * Thesaurus Wort Limit=10
  * Wordforms Word Limit=10
  * Similarity Wort Limit=10
  * LeftCollocationFinder Wort Wortart Limit=10
  * RightCollocationFinder Wort Wortart Limit=10

A full list of available services, their parameters and additional information on what each service does can be obtained with the help function.


Returns a string containing information about the service with name $service. If no service name is given, a short list of all available services is returned. If $service eq 'full', a more detailed list is created.


The use_service function returns a result object of class Lingua::DE::Wortschatz::Result that holds the results.

This object offers methods to conveniently access the data.



Pretty prints the data to STDOUT.



Returns the name of the service that was used to obtain the data.



Returns a list of the names of the data columns.



Returns a list of datasets. Each dataset is a reference to a list of values.



Returns a list of datasets. Each dataset is a references to a hash. The hashkeys are the names of the return values and the values are the data.


I wrote this to understand SOAP better. It took me way too long, due to the lack of documentation.

I couldn't figure out how to make SOAP::Lite and SOAP::Data create the request parameters in the correct way. It appears to me that this would require me to create custom as_Datatype functions for all the used types.

I could neither make it work using the WSDL file. I think with the data format that wortschatz.u-l requires, WSDL is pretty useless.

So I decided to use a straightforward approach and create the XML request parameters myself. This is probably not the idea of that whole SOAP thing, but it's short and it works. But see it as a hack.



This is $Id:,v 1.9 2005/11/21 13:58:07 manonegra Exp $.

Copyright 2005 Daniel Schröer (

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: