Hi John, >Can you help me with a few questions? - I will try. Others may offer alternate or additional information.
> If I wanted to create a modified workflow without the entire source code, > could I create a jar file of the module I wanted to modify and then replace > that jar file in the User Install - Yes. In IntelliJ you should be able to open the Maven panel to handle this. If you compiled with some other means, then in the top menubar View > Tool Windows > Maven. The maven panel should display a list (tree) of all of the ctakes modules. You can build an individual module here. For instance, Apache cTAKES Dockhand > Lifecycle > package. You will see some progress information in the run panel, including: [INFO] Building jar: C:\Spiffy\ctakes_trunk\ctakes-dockhand\target\ctakes-dockhand-4.0.1-SNAPSHOT.jar You just build a single module's jar - in this case the ctakes basic installation gui. The location of your new jar file will be in a location on your system. >or would I need to compile the entire source code for cTAKES? - No, but if you do ever want to build the entire module, use the maven panel, Apache cTAKES (root) > Lifecycle > package. >When I try to create a jar file within IntelliJ IDEA, it asks for the main >class. - It shouldn't do this if you use the maven package process as I outlined above. If you still get a main class question then send me info on your complete process and I'll see if I can duplicate it. >or should I build a jar file for the modified module without a main class and >then replace that in the lib/ folder of the User Install version of cTAKES? - You should build one without specifying a main class and copy it to lib/ in the User Install. > when I try to run cTAKES, I receive the error: The feature org.apache.ctakes.typesystem.type.textspan.List:items is declared twice, with incompatible multipleReferencesAllowed specifications - Is it an error that stops ctakes from running or is it just a warning? The root of the problem is that different modules have copies of the type system xml. This should be unnecessary and causes this problem if somebody modifies properties in one but not another. For Instance, in ctakes-type-sysstem TypeSystem.xml : <featureDescription> <name>items</name> <description/> <rangeTypeName>uima.cas.FSList</rangeTypeName> <elementType>uima.tcas.Annotation</elementType> <multipleReferencesAllowed>true</multipleReferencesAllowed> </featureDescription> While in others: <featureDescription> <name>items</name> <description/> <rangeTypeName>uima.cas.FSList</rangeTypeName> <elementType>uima.tcas.Annotation</elementType> </featureDescription> This is essentially a bug that I am "fixing" right .. about .. now ... >I haven’t made any modifications to how the type system is called, only in how >a custom dictionary is accessed. - Just out of curiosity, how did you change custom dictionary access? Maybe we can add it to ctakes. Sean ________________________________________ From: JOHN R CASKEY <jrcas...@medicine.wisc.edu.INVALID> Sent: Wednesday, May 19, 2021 5:01 PM To: dev@ctakes.apache.org Subject: Java Question [EXTERNAL] * External Email - Caution * Hello, The cTAKES User Install is mostly sufficient for my lab, but I’ve found that I need to modify a few of the modules. I downloaded the cTAKES source and can successfully run workflows after updating the source code, but I’m having trouble building the modified modules and essentially creating an updated User Install of cTAKES from the source code. Can you help me with a few questions? * I’m running IntelliJ IDEA, and I can compile the cTAKES source code with build profiles like runPiperGui without problems to run cTAKES programmatically or to start a GUI. I can also run essentially the same workflow in the User Install version by running the bash helper script ‘runPiperFile.sh’. If I wanted to create a modified workflow without the entire source code, could I create a jar file of the module I wanted to modify, and then replace that jar file in the User Install version, or would I need to compile the entire source code for cTAKES? * When I try to create a jar file within IntelliJ IDEA, it asks for the main class. Would this be a class I create for the workflow I’m using, or something else? For example, could I use org.apache.ctakes.examples.pipeline.HelloWorldPiperRunner as a template to build a customized main class that would run programmatically, or should I build a jar file for the modified module without a main class and then replace that in the lib/ folder of the User Install version of cTAKES? * I can create a jar file of a module within IntelliJ IDEA and then replace the modified jar file in the User Install version (for example, modifying ctakes-dictionary-lookup-fast-4.0.0.1.jar and replacing it in the lib/ folder), but when I try to run cTAKES, I receive the error: The feature org.apache.ctakes.typesystem.type.textspan.List:items is declared twice, with incompatible multipleReferencesAllowed specifications I haven’t made any modifications to how the type system is called, only in how a custom dictionary is accessed. Do you have any idea what could be causing this error? Thanks! John Caskey