GraphVisualizationExample resource files

47 views
Skip to first unread message

Murat Ozturk

unread,
Dec 18, 2013, 5:52:37 PM12/18/13
to dkpro-w...@googlegroups.com
Hello guys,

I am trying to run the main application of class GraphVisualizationExample.
It needs to get extjwnl_properties.xml and DKProWSD_SK_graph.ser resource files.
How can I get these 2 files?

Thanks in advanced.
Best regards,

Murat.

Tristan Miller

unread,
Dec 19, 2013, 4:44:52 AM12/19/13
to dkpro-w...@googlegroups.com
Greetings.

On 18/12/13 11:52 PM, Murat Ozturk wrote:
> I am trying to run the main application of class GraphVisualizationExample.
> It needs to get *extjwnl_properties.xml *and *DKProWSD_SK_graph.ser
> *resource files.
> How can I get these 2 files?

Using WordNet and extJWNL is covered in the DKPro WSD FAQ at
<https://code.google.com/p/dkpro-wsd/wiki/LSRs#WordNet>. Basically, you
need obtain the extjwnl_properties.xml file from the extJWNL
distribution and modify it so that the dictionary_path parameter points
to your WordNet installation. There are further instructions on the
extJWNL website at
<http://sourceforge.net/apps/trac/extjwnl/wiki/GettingStarted>. If you
don't yet have WordNet, you need to download that as well.

As the GraphVisualizationExample source code comments indicate, you
don't need any .ser file. You can comment out that line and the program
will still work, though it will take a bit longer to start up as it
needs to read all of WordNet into memory. If you want, you can produce
a serialized graph file yourself with something like the following:

WordNetSenseKeySenseInventory si = new WordNetSenseKeySenseInventory(new
FileInputStream("/path/to/extjwnl_properties.xml"));
UndirectedGraph<String, UnorderedPair<String>> g = si.getUndirectedGraph();
FileOutputStream fileOut = new
FileOutputStream("/path/to/DKProWSD_SK_graph.ser");
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(g);
out.close();
fileOut.close();

Regards,
Tristan

--
Tristan Miller, Research Scientist
Ubiquitous Knowledge Processing Lab (UKP-TUDA)
Department of Computer Science, Technische Universität Darmstadt
Tel: +49 6151 16 6166 | Web: http://www.ukp.tu-darmstadt.de/

signature.asc
Reply all
Reply to author
Forward
0 new messages