Error loading list when adding a list to Arabic plugin gazetteer

160 views Asked by At

I tried to add a new list to the arabic plugin gazetteer. I followed the following steps:

  1. create a new file "tags.lst" to the directory "GATE_Developer_8.1\plugins\Lang_Arabic\resources\gazetteer\"
  2. append the "lists.def" file with: "tags.lst:tags::arabic"

When launching the gate software, a window pop-up with the following message:

Resource could not be created!

gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: tags.lst: java.io.IOException: The system cannot find the path specified.

Here is the full exception:

gate.creole.ResourceInstantiationException: gate.util.GateRuntimeException: Error loading list: tags.lst: java.io.IOException: The system cannot find the path specified
    at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:281)
    at gate.creole.gazetteer.DefaultGazetteer.init(DefaultGazetteer.java:119)
    at gate.Factory.createResource(Factory.java:432)
    at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:257)
    at java.lang.Thread.run(Thread.java:745)
Caused by: gate.util.GateRuntimeException: Error loading list: tags.lst: java.io.IOException: The system cannot find the path specified
    at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:527)
    at gate.creole.gazetteer.LinearDefinition.load(LinearDefinition.java:276)
    ... 4 more
Caused by: gate.creole.ResourceInstantiationException: java.io.IOException: The system cannot find the path specified
    at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:199)
    at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:158)
    at gate.creole.gazetteer.LinearDefinition.add(LinearDefinition.java:520)
    ... 5 more
Caused by: java.io.IOException: The system cannot find the path specified
    at java.io.WinNTFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:1012)
    at gate.creole.gazetteer.LinearDefinition.loadSingleList(LinearDefinition.java:188)
    ... 7 more

I will appreciate any help ??

1

There are 1 answers

0
M.SH On BEST ANSWER

The Problem was due to two major issues which are:

  1. The file was not saved correctly as utf-8 encoding which was resolved by using online converter: http://www.motobit.com/util/charset-codepage-conversion.asp

  2. The file contains special characters which were resolved by using the following replaceAll regular expression [#|"|:]:

line = line.replaceAll("[#|\"|:]", " ");