Dear Keith,
Ilian forwarded one of your messages, and i will answer to a part of
it. He will handle the rest.
Here is the relevant paragraph and my answer is below:
"However, now I can run the populate tool and save the results to a
SerialDataStore, but I can't open that data store in GATE. GATE throws a
FileNotFoundException for the __GATE_SerialDataStore__ file. However, I
haven't tried 1.6.8.14 yet so I don't know if this behaviour has
changed, or if I even really need it. I think it would be handy for
those of us that want to poke around in the guts of KIM, but not
necessary for anyone else. The other thing that would be handy would be
the ability to load the KIM IE.gapp file into GATE, or at least most of
the PRs that are used by the KIM pipeline. For example, sometimes a
Jape rule doesn't annotate something the way that I expect it to, but I
don't know if it is because the gazetteer didn't correctly identify
something, or if the Jape rule doesn't match what I expect it to. "
Our suspicion is that you are trying to open (as a datastore) a folder
which is actually internal to the datastore folder structure. Please try
to pass its parent folder as the location of the datastore and see what
happens. This is a genuine GATE Serial Store so there are no hidden
rocks in this quiet bay.
Regarding the loading of KIM IE.gapp into GATE directly - i am afraid
this is not possible currently. It is indeed something we would like to
achieve upon a closer integration with the Sheffield developments, so
expect developments in this direction.
At least this should include the modelling of the Semantic Repository
into something similar to a GATE datastore, so that GATE could be aware
of it and the PRs could count on it.
The suggested usage currently is to use the KIM Client PR, load it into
GATE, let it use a started KIM Server and get the resulting annotations
in the GATE environment. There you could exercise control over the KIM
Client(s) by altering their parameters. E.g. - use instance generator or
omit it ( this will return all the annotations including the
temporary/internal ones, but nothing will be generated in the KB).
You could also use the other KIM Clients available from the GATE GUI
link in the bin folder of the KIM Install. E.g. KIM Run Only Gazetteer -
will run only the gazetteer and give you just the lookups.
hth and have a good day
borislav
>
> ----- Original Message ----- From: "Keith Suderman"
> <[EMAIL PROTECTED]>
> To: "Ilian Kitchukov" <[EMAIL PROTECTED]>
> Sent: Friday, August 18, 2006 23:58 PM
> Subject: Re: [KIM-discussion] More on extending KIM
>
>
>> Hi Ilian,
>>
>> I haven't sent this to the KIM-discussion list since we are starting
>> to get away from the topic of general KIM usage. However, feel free
>> to forward this message back to the list if you feel others would
>> benefit.
>>
>> Responses are in-line.
>>
>> At 08:39 AM 8/15/2006, you wrote:
>>
>>> The only problem I have is calling
>>> gate.DataStore.setStorageUrl() method which takes String,
>>> i.e. I'm not supposed to pass an URL nor am responsible for parsing
>>> the string.
>>> So this is why I made a patch. Can't think of anything more clever.
>>
>> Ah yes, it's coming back to me now. This was the problem I ran into
>> in the past; GATE passing URLs around as strings. This is probably a
>> topic for the GATE discussion list (I am also a subscriber), but I
>> have done some experimenting and think I've identified the root cause
>> of the problem. I took a look at the GATE source code for
>> SerialDataStore.setStorageUrl(String s) and all it does is the
>> following (exception handling code removed for brevity)
>>
>> public void setStorageUrl(String urlString) throws
>> PersistenceException {
>> URL storageUrl = new URL(urlString);
>> this.storageDir = new File(storageUrl.getFile());
>> } // setStorageUrl
>>
>> It seems simple enough, but the problem is with the call to
>> storageUrl.getFile(). On my Mac I get the following results:
>>
>> System.out.println(new URL("file:/usr/local").getFile());
>>
>> prints"/usr/local" while
>>
>> System.out.println(new URL("file://usr/local").getFile());
>>
>> prints"/local", which is exactly the behaviour I was seeing earlier.
>>
>> Another work around would be to call the
>> SerialDataStore.setStorageDir(File dir) method, which performs the
>> same function as setStorageUrl() only it takes a java.io.File object
>> rather than a String. The setStorageDir() method isn't a part of the
>> gate.DataStore interface so you'll need to cast the data store object
>> to a SerialDataStore first.
>>
>> However, now I can run the populate tool and save the results to a
>> SerialDataStore, but I can't open that data store in GATE. GATE
>> throws a FileNotFoundException for the __GATE_SerialDataStore__
>> file. However, I haven't tried 1.6.8.14 yet so I don't know if this
>> behaviour has changed, or if I even really need it. I think it would
>> be handy for those of us that want to poke around in the guts of KIM,
>> but not necessary for anyone else. The other thing that would be
>> handy would be the ability to load the KIM IE.gapp file into GATE, or
>> at least most of the PRs that are used by the KIM pipeline. For
>> example, sometimes a Jape rule doesn't annotate something the way
>> that I expect it to, but I don't know if it is because the gazetteer
>> didn't correctly identify something, or if the Jape rule doesn't
>> match what I expect it to.
>>
>>> Yeah, I see from the log, that no matter that you did 'sudo'
>>> the user name the installer uses is the one you logged with.
>>
>> Yes. I have found that even using "sudo -i", which is supposed to
>> reset the user's HOME variables etc, doesn't on a Mac. I did try
>> logging out and logging back into the root account (which is disabled
>> by default in Mac OSX) and I was able to install KIM with no problem.
>> However, then I simply got permission errors when trying to run KIM
>> from a user account. What I eventually did was create a symbolic link
>> from /usr/local/kim-platform that points to /Applications/KIM.
>> However, the easiest solution for most people is to simply create the
>> /usr/local/kim-platform directory with the proper permissions before
>> running the installer. I have read that Apple has changed the way
>> their "Authentication Services" work in OSX 10.4 (Tiger) so this
>> could be the real problem.
>>
>>> - it is possible it tries to open the file dialog in read-write mode
>>> with the default folder
>>> (I cannot control this from anywhere) and may be again a question of
>>> permissions.
>>
>> I don't think the problem with the "Choose" button has to do with
>> permissions as I received the same error when I attempted to install
>> KIM while logged in as root. Given the nature of the exception
>> (dialog type not supported) I almost suspect a bug in InstallAnywhere
>> or in Apple's JVM.
>>
>>> So, in general, you could use directly the edit box, as you probably
>>> do.
>>
>> Unfortunately there is no edit box that I can edit directly, only the
>> "Choose" button, which causes the installer to hang. So I have no
>> choice but to install KIM into the default location.
>>
>>> But you can also help me if you can tell me which of the following
>>> means what and which is more appropriate for the app and for the
>>> aliases:
>>
>> I can try, but remember I've only had a Mac for two weeks now and I'm
>> still learning The Apple Way myself. ;)
>>
>>> Clean-Up at Startuo Folder
>>
>> I've seen other installers use this as a temporary location. I
>> assume it is simply a directory that OSX empties every time it boots
>> so don't put anything that you want to keep around here!
>>
>>> Preferences Folder
>>
>> This is a system folder (/Library/Preferences) used for (you guessed
>> it) preference settings. You won't put anything here unless you are
>> writing a native OSX application and using the Apple API.
>>
>>> User Application Folder
>>
>> Every user has an "Applications" folder in their home directory
>> (~/Applications) so installing here would mean only the user that
>> installed the application would be able to use it.
>>
>>> The Dock
>>
>> This is the bar across the bottom of the OSX desktop with application
>> icons. The dock acts like a cross between the Windows Start Menu and
>> Task Bar. You probably don't want to install more than one icon on
>> the dock. It is simple enough for the user to move any applications
>> they want to the dock themselves if they want.
>>
>>> These (above) are the MacOSX native folders that the installer
>>> offers me.
>>> It would be great if I could obtain some folders with equal meaning to
>>> Program Files
>>
>> There is a directory called "Application" off the root directory
>> (that is, /Applications) that is the recommended location for
>> installing programs that should be accessible to all users.
>>
>>> Start Menu
>>
>> The Dock.
>>
>>> Desktop
>>
>> Every user has a "Desktop" directory in their home directory
>> (~/Desktop) that serves as their Desktop. Any files copied to
>> ~/Desktop will show up on the user's desktop.
>>
>>> Honestly, I don't really expect them to work.
>>
>> Ok, I was just letting you know that they didn't. ;)
>>
>>> But if you can provide me some info on how desktop icons are being
>>> created and handled under MacOSX I could try making a separate
>>> script that creates them especially for OSX
>>
>> Ideally, on OSX a program would be packaged into what is called (in
>> Macspeak) an "Application Bundle", which is simply a directory with
>> an ".app" extention that contains all the application files and OSX
>> displays to the user as a single entity with a single icon. This
>> doesn't make much sense for KIM since you want to install several
>> icons for starting/stopping the various services etc. and you want
>> users to be able to access files "inside" the bundle. However, this
>> has its advantages for Java applications as you don't have to worry
>> about setting the classpath; any jar files in the bundle will be
>> automagically added to the classpath for you. InstallAnywhere should
>> be capable of generating OSX application bundles as their installer
>> is a perfect example of how a OSX application should be bundled.
>>
>> However, after much searching I have found out that to get OSX to run
>> a script when you double click on it you have to change the extension
>> to .command, that is "startKIM.command" instead of "startKIM.sh". I
>> am sure there are ways to set the "default action" for a file, but by
>> default OSX opens .sh files in a text editor and opens.command files
>> in a shell (which executes them). The only caveat is that when the
>> script is run the current directory is the root directory not the
>> directory containing the script. I've fixed this problem by adding
>> the line "cd /usr/local/kim-platform/bin" to the start of all the
>> scripts I use. I then created a KIM folder on my desktop that
>> contains aliases (Macspeak for symbolic links) to the scripts that I
>> want to run. I can assign icons to all of these aliases, folders etc
>> via the OSX desktop, but I have no idea how to do it programmatically.
>>
>> Hope this helps.
>> Cheers,
>> Keith
>>
>>
>>
>> __________ NOD32 1.1715 (20060818) Information __________
>>
>> This message was checked by NOD32 antivirus system.
>> http://www.eset.com
>>
>>
>
>
>
_______________________________________________
NOTE: Please REPLY TO ALL to ensure that your reply reaches all members of this
mailing list.
KIM-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion_ontotext.com