I want to use The GATE Predicate-Argument EXtractor Component (PAX) - nlp

I want to use The GATE Predicate-Argument EXtractor Component (PAX), but I can't figure out how to load the plugin on GATE developer (ver. 7)
Please help me.
How do I load it?

The MultiPaX plugin is a bit of a complex beast. You need to download the package from the homepage, unpack it (use something like 7-zip if you're on Windows) and then build it using Ant, which you will need to install separately - GATE used to bundle a copy of Ant but that is no longer the case since version 7. Once you have the plugin compiled and packaged you should be able to load it through the plugin manager the same as any other plugin.
However, to get anything useful out of the PR you need to build quite a complex pipeline including at least one of SUPPLE, MiniPar or the Stanford Parser PR. Getting these to work is itself a non-trivial task...
The predicate argument extractor is not developed by the core GATE team, so specific questions are probably better posted in the semanticsoftware.info forum (linked from the bottom of http://www.semanticsoftware.info/pax) rather than the usual GATE user list.

Related

Problem installing Pattern Lab 3 plus Twig

I'm having some trouble with Pattern Lab 3 plus Twig.
Following the instructions at https://patternlab.io/docs/installation.html:
I install with: npm create pattern-lab.
I choose Twig (PHP) as the templating language.
I choose Twig (PHP) demo patterns (full demo website and patterns) as the the initial patterns
I do see the note The PHP version of Pattern Lab is being deprecated in favor of a new unified Pattern Lab core. The PHP docs for this topic can be viewed here.. Clicking on the link just takes me to installtion page for PHP edition of PL v.2. Not helpful. So I press on to https://patternlab.io/docs/generating-pattern-lab.html.
Next I'm supposed to run php core/console --watch. There is no core sub-directory. Things are not looking promising.
I remove my PL installation and try again with handlebars templating. With one exception, all is good. The exception: I wanted twig templates.
Ideas?
Indeed, the PatternLab website you saw around the time you posted this still reflected the 2.x/3.x days. Work is being done to get the legacy out and the current state in.
Last month, I contributed to this package: #pattern-lab/engine-twig. This engine is a pure Javascript based twig engine which prevents the need for PHP. It uses the Twing library under the hood (since v5.8.0). There are still things to iron out, but I welcome you to try it. Please file bugs here:
https://github.com/pattern-lab/patternlab-node/issues

Recommended way to find out what Liferay module provides a class

In my Liferay module, I want to use Liferay's SomeConvenientClass.
What is the recommended way to find out what module provides that class?
So that I can quickly add it to my build.gradle.
Ideally it should either:
return the module's group/name/version,
or say with certitude that this class does not exist in Liferay or is not exported.
Until now I go by trial-and-error and copy/paste from build.gradle files found in the wild, but I am looking for a more reliable method.
I have Liferay installed, and the source code of the exact same Liferay version, if that helps.
I tried mvnrepository but it does not seem to return anything, example: https://mvnrepository.com/search?q=AuditMessageProcessor
Have you tried http://search.maven.org/#advancedsearch ?
For example:
http://search.maven.org/#search|ga|1|c:"AuditMessageProcessor"
This is more an option than a real thing, but this is how I normally do:
be familiar with package naming conventions used by liferay and
inside apps: api, service, web...
be familiar with the bundle structure used by liferay, as their
use of resource folders, which are not so obvious sometimes...
With that in mind, normally on github is enough to navigate: portal->(kernel/impl/services/apps)->app service/api/web...
But this is a natural process that comes when you spend your day inside the code.
Normally, online jar locators help, but quite often I just rely on my IDE.
On my IDE I have all set-up with Spring dependency management, after I extracted the dependencies using Gogo shell with a running bundle. With Gogo you will not find classes, but modules and packs will be listed. (Gogo is probably what you are looking for btw, as it is able to list with version numbers)
Bottom line, if you need a list as a picture of a running environment, use Gogo.
With regards to the master code, just do not trust it! When it comes to modularity and bundles versioning Liferay is pretty messy (read The dependency management problem here: https://www.e-systems.tech/blog/-/blogs/liferay-digital-experience-platform-review-7-0-ga4).
For your step 7, you will need to chose an api version and code against it. The apis are more stable. You can impose a limit for compatibility on you bnd file, which will cause the system to issue warnings. On your environment, you can catch api changes earlier, let's say, you can ask gradle to use a module with an version number but any patch (using the "+" sing), when you build with a fresh cache or if you change gradle resolution strategy to download you dependencies more frequently, if the build breaks, well, you will see it.
Helpful start point: https://dev.liferay.com/pt/develop/reference/-/knowledge_base/7-0/using-the-felix-gogo-shell
This is how I do, it is slow and manual, so don't hesitate to suggest other methods.
Download Liferay's source code if you don't have it already.
Run find . -name SomeConvenientClass.java. If nothing is found, you can be sure the class is not part of Liferay.
In the path to the class, find the src folder level, and go just under that, so for instance if it is modules/apps/collaboration/document-library/document-library-web/src/main/java/com/liferay/document/library/web/portlet/action/DLViewMVCRenderCommand.java then go to modules/apps/collaboration/document-library/document-library-web/.
Hopefully there is a bnd.bnd file there, open it.
If the package of the class is not in the Export-Package section, then either give up (duplicate Liferay's code into your module), or use some dark tricks. If you believe the class should be exported, you can explain your case at https://issues.liferay.com/browse/LPS-70480 for future generations to enjoy.
Module name is the value of Bundle-SymbolicName.
Version is the value of Bundle-Version.
Group is probably com.liferay, although sometimes it is com.liferay.portal, not sure how to tell.
Build. Sometimes it fails because Maven repositories are missing a version, for instance com.liferay.document.library.web 1.0.11 is not available despite being used by DXP fix pack 30. Not sure what to do in such cases except choosing a "similar" version and hoping for the best.

Modx script after package installation

I need to write a plugin that needs to create table in database and some setting from installation form. I can easily create form but I have difficulty to run the script after installation to read options and create table. Is it possible at all to run such simple script or maybe you need to create everything like for example models, vehicles and so on?
I would appreciate if anyone could give me directions how to do it. Modx documentation is not clear about this and https://github.com/splittingred/Doodles/tree/production sample repo contains multiple elements I'm not familiar with and I believe don't need at all
Typically you'd use a resolver to run code after the install.
While in the question comments the setup options are discussed, the package attributes there are actually executed to generate the setup options form, not to process the results.
The docs are a tad dated (mostly the screenshots), but Creating a 3rd party build script explains the different parts of a build script, and what they're for, with a fair bit of examples.
The piece you're looking for is this:
$vehicle->resolve('php',array(
'source' => $sources['resolvers'] . 'setupoptions.resolver.php',
));
You'll need to have a $vehicle (perhaps from a category or other object you're adding to the build) and the file in the provided location. Inside the resolver file you can use $object->xpdo as an instance of the modX class to do your thing.

Errors when running Language-Solution in MPS

I'm developing an DSL with jetbrains MPS. It's not obvious to use, but I succeeded so far with the design-part.
It's possible to right-click on a solutions node and "run" it, assuming the language is executable (extends executing.util). Plus I use a seperately developed jar as a library (used by the generator).
I build a new project to test, as simple as possible, added some extra nodes and loops in the generator, the error occures and it can't be undone.
As far as I can see, there are several possible sources of errors.
dependencies (they are tricky in MPS)
my jar
wrong cached files or so
Executing "run" causes the following error:
error: could not find or load main class MySolution.package.map_concept
Has some of you out there experience with this?
Tell me, if there are some extra information that would help.
It seems that you have added the jar file as a model to the language, which makes it invisible for the solution. Following the instructions at https://confluence.jetbrains.com/display/MPSD32/Getting+the+dependencies+right#Gettingthedependenciesright-AddingexternalJavaclassesandjarstoaprojectruntimesolutions and creating a separate library solution worked for me.
To me this looks like a problem of the generator. Have you fully rebuilt the project - right-click on the "project" node in the structure tree?
Is the root mapping template correct? If you can share your project, I can have a look.
A small tip that could have saved me some time and might also solve this problem for someone else, even if you followed the instructions in other answers.
When prompted to add your libraries to modules after including the libraries on Java tab, dismiss the window if you already included them in the first place on the Common tab. Otherwise they are listed once despite having been added twice, leading to a compilation failure.

How can I show Expresso and node-jscoverage output in Hudson?

We use Hudson (well, Jenkins now) for CI. I have just started a project based on Node.js, and am investigating Expresso and Gently (testing and mocking). I really like the fact that Expresso works with node-jscoverage to generate code coverage reports.
Has anybody started a project to display Expresso and node-jscoverage reports (or JScoveage) in Hudson? Failing that, is there some documantation on what kind of output Hudson is expecting, short of inventing an entire new plugin?
In summary, I'm looking for two types of output here. Test results (like junit) and coverage reports (like Cobertura).
Do Expresso and node-jscoverage produce xml output?
If so,
Jenkins and cFix unit testing (C++)
Following the above, you could convert your xml output to formats that junit understand (for tests, using an XSLT), and convert your coverage xml output into cobertura format (again, using XSLT).
See this also:
http://www.van-porten.de/2009/05/cunit-tests-in-hudson/
for a sample XSLT.
You could try the xUnit plugin. On their wiki page it says that it can handle txt and csv files using custom style sheets. In theory this should work for your test reports t least. I have never tried that though.
As for coverage I am not aware of any plugins that can deal with arbitrary coverage tools.
If the HTML reports the tools produce are usable you could use the HTML Publisher plugin to link those reports in your job, and make them accessible from Jenkins. Not as nice an integration as a test tool plugin can provide, but depending on your expectations it might be enough.
Otherwise you will probably be forced to write a custom plugins. You could also try a request on the Jenkins Mailing List, maybe someone is working on such a plugin already.

Resources