Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample config file #8

Open
logological opened this issue Jun 22, 2016 · 6 comments
Open

Sample config file #8

logological opened this issue Jun 22, 2016 · 6 comments

Comments

@logological
Copy link
Member

logological commented Jun 22, 2016

As far as I can tell, there is no documentation whatsoever about the config file format for DKPro LSR, nor is a sample file provided in the source tree. It's critical that we provide some documentation about the format, as well as an example file and instructions on where to put it so that DKPro LSR can find it. DKPro LSR cannot be used without a config file.

Is it possible there was some documentation about this on Google Code that didn't get migrated here to GitHub?

@logological
Copy link
Member Author

Apropos of this recent query on the DKPro WSD mailing list, is there any chance this issue could be fixed? Presumably @zesch has a config file that demonstrates how to configure each of the LSRs supported by DKPro LSR? (I have a resources.xml file but only for WordNet, GermaNet, Wiktionary, and Wikipedia.)

@zesch
Copy link
Member

zesch commented Jun 11, 2019 via email

@logological
Copy link
Member Author

Not really—the problem is that different LSRs take different positional arguments, but there is no documentation about them. The resources.xml file you referred to contains beans only for Wiktionary, which takes two arguments, a language ID (looks to be the English-language name of the language, in upper case) and a path to a Wiktionary dump. Wikipedia resources, on the other hand, take five arguments: a hostname, some sort of code that looks like it might identify an API or a database table, presumably a username and a password, and again some sort of language ID (again, not completely sure what scheme, but looks like another English-language language name, but this time in lower case). WordNet takes a single argument, which looks like the path to an extJWNL wordnet_properties.xml file.

The mailing list enquirer wants to use OpenThesaurus, but I can't even find an example showing what arguments it needs. The best I'd be able to do is to reverse-engineer the DKPro LSR source code to determine what's required.

Do you happen to have any documentation about which arguments are required for each type of LSR supported by DKPro LSR? Or at least a resources.xml file that shows examples for each type of LSR?

@zesch
Copy link
Member

zesch commented Jun 11, 2019 via email

@reckart
Copy link
Member

reckart commented Jun 11, 2019

This is what I could distill from a resources.xml I still had lying around on my machine. No OpenThesaurus in there though...

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
	
	<bean
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
	</bean>
	
	<bean id="germanet-example" lazy-init="true"
		class="de.tudarmstadt.ukp.lexsemresource.resource.GermaNetResource">
		<constructor-arg value="${DKPRO_HOME}/de.tudarmstadt.ukp.lexsemresource.util.loader.ResourceLoader/gn_xml/"/>
	</bean>
	
	<bean id="wordnet-example" lazy-init="true"
		class="de.tudarmstadt.ukp.lexsemresource.resource.WordNetResource">
		<constructor-arg value="${DKPRO_HOME}/de.tudarmstadt.ukp.lexsemresource.util.loader.ResourceLoader/wordnet3/wordnet_properties.xml"/>
	</bean>
	
	<bean id="wiktionary-example" lazy-init="true"
		class="de.tudarmstadt.ukp.lexsemresource.resource.WiktionaryResource">
		<constructor-arg value="ENGLISH"/>
		<constructor-arg value="${DKPRO_HOME}/de.tudarmstadt.ukp.lexsemresource.util.loader.ResourceLoader/enwiktionary-20090111__jwktl0.12rc1"/>
	</bean>
	
	<bean id="wikipedia-article-example" lazy-init="true"
		class="de.tudarmstadt.ukp.lexsemresource.resource.WikipediaArticleResource">
		<constructor-arg value="MYSQL HOST"/>
		<constructor-arg value="DBNAME"/>
		<constructor-arg value="USERNAME"/>
		<constructor-arg value="PASSWORD"/>
		<constructor-arg value="LANGUAGE"/>
	</bean>

	<bean id="wikipedia_category-example" lazy-init="true"
		class="de.tudarmstadt.ukp.lexsemresource.resource.WikipediaCategoryResource">
		<constructor-arg value="MYSQL HOST"/>
		<constructor-arg value="DBNAME"/>
		<constructor-arg value="USERNAME"/>
		<constructor-arg value="PASSWORD"/>
		<constructor-arg value="LANGUAGE"/>
	</bean>
</beans>

So in principle you'd have to look up the constructors of the respective resource classes to see what constructor arguments they take.

@logological
Copy link
Member Author

DKPro LSR is also not really maintained anymore as far as I know.

Sad if true, as DKPro Similarity depends on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants