Commit Graph

119 Commits

Author SHA1 Message Date
krasimir
a839bdc687 bugfix for print names in the C runtime and expose the functionality from Java 2017-05-11 09:11:30 +00:00
krasimir
2cf98147e6 construction of Int and Float literals in the Java binding 2017-05-11 07:44:10 +00:00
krasimir
a77ae5da30 added Expr.apply 2017-05-10 14:41:55 +00:00
krasimir
83117602af bugfix in the Java binding 2017-05-10 13:31:14 +00:00
krasimir
2675aec1f9 a simple optimization for getCategories, getFunctions, getFunctionsByCat in the Java binding 2017-05-10 12:46:32 +00:00
krasimir
6283489260 finished Type.getHypos & added Hypo.getType 2017-05-10 12:19:27 +00:00
krasimir
2f9c1c3764 a partial implementation for Type.getHypos. at least it lets us to count the number of arguments to a function 2017-05-10 08:40:12 +00:00
krasimir
74ce52d761 in the Java binding mark all internal functions as hidden 2017-04-19 11:08:09 +00:00
krasimir
e650b9c5fc use gu_string_buf_data in the Java binding to avoid double copying of strings 2017-04-13 13:21:32 +00:00
krasimir
3467a54965 bring the Haskell binding a bit closer to the pure Haskell API 2017-01-26 12:48:22 +00:00
krasimir
3c36318246 added linearizeAll in the Java API 2017-01-24 10:14:12 +00:00
krasimir
f6ecf0ce56 resolve a conflict that was for some reason commited in src/runtime/java/Makefile 2017-01-24 09:36:39 +00:00
aarne
8729339d26 BNF grammars (.bnf or .cf) can have rules without semicolons, as in the GF book examples. However, if the grammar has any multiline rules, all of them must have semicolons. 2016-09-05 21:15:44 +00:00
krasimir
3381ae1aa0 added getFunctionProb in the Java and C API 2016-05-30 11:25:59 +00:00
krasimir
69433b9660 the Java API now also has access to the token's category while doing completion 2016-05-25 12:39:51 +00:00
krasimir
fdf4bd3196 change the API for literals in Java and Python. The input sentence is no longer a parameter to the callbacks. 2016-05-20 15:20:02 +00:00
krasimir
1a0defc0fc in case of null argument it is more intuitive to report the argument index by counting from 1. 2016-05-19 20:48:47 +00:00
krasimir
4996d5d90b the constructor for expressions in the Java runtime now checks for null arguments. This means that a potential problem is detected earlier before we jump into the JNI code. 2016-05-19 20:41:09 +00:00
hallgren
41171be5a6 Fix a problem building the Java binding when creating binary packages
Pass -I and -L flags to gcc so that the C run-time system can be found.

Also added a line in src/runtime/java/Makefile to install jpgf.jar.
2016-04-25 14:21:04 +00:00
krasimir
627abeb703 added PGF.inferExpr and Type.toString in the Java binding 2016-04-14 13:12:22 +00:00
krasimir
f0014f61a7 added PGF.compute in the Java binding 2016-04-13 12:57:06 +00:00
krasimir
f0ca9cd732 added getFunctionsByCat 2016-04-13 12:49:08 +00:00
krasimir
1019b7faf5 added getCategories() and getFunctions() in the Java binding 2016-04-13 12:02:42 +00:00
krasimir
8548979d1c Now we even test in two different places for the JNI headers. Once for Linux and once for Mac OS. This is still not ideal since different Linux distributions might use different locations. 2016-02-17 14:52:48 +00:00
krasimir
9e3944951c typo in the new Makefile 2016-02-17 14:40:46 +00:00
krasimir
279f66c950 a version of the Makefile for the Java binding which should work on Linux and Mac OS 2016-02-17 14:37:55 +00:00
krasimir
5576688410 javadoc comments in the Java binding 2016-01-14 19:03:13 +00:00
krasimir
545e1a0cc8 fix in the Java binding: the Expr class should also ensure that libjpgf.so is loaded to avoid failures if Expr is the first class that is used. 2015-11-27 15:35:53 +00:00
krasimir
008ca97428 added Expr.equals method in the Java binding 2015-11-26 15:38:12 +00:00
krasimir
279fdb74b7 bugfix in the Makefile for the Java binding for creating .jar files 2015-11-16 14:39:52 +00:00
krasimir
634d3dff7d bugfix in the SG binding for Java 2015-11-13 17:21:27 +00:00
krasimir
f6bb796276 added Java API for insertion of triples in the semantic graph 2015-11-13 14:34:24 +00:00
krasimir
8cc7ccf80b API for triple queries from Java 2015-09-04 11:03:46 +00:00
krasimir
3328dd1f8d Java API for opening/closing SG databases 2015-09-03 13:52:32 +00:00
krasimir
7064181860 the Eclipse project for the Java binding is now replaced with a simple Makefile 2015-09-03 10:27:50 +00:00
krasimir
e97e377b05 silence compilation warnings in the Java binding 2015-09-03 10:11:23 +00:00
krasimir
b3680b6025 merge the states for reasoning and evaluation into a single structure 2015-07-03 11:53:52 +00:00
krasimir
616a24cba4 the NERC in C is now fully up-to-date with the other NERCs. In addition the NERC in Haskell and Java now refuses to recognize names that match words in the lexicon. The latest is useful for German 2015-05-19 07:26:56 +00:00
krasimir
ce05465365 the callbacks in C now take the concrete syntax as a parameter 2015-05-18 14:41:33 +00:00
krasimir
4221757895 bugfix in the java binding 2015-04-16 13:53:03 +00:00
kr.angelov
9bc5349e62 change in the API for literals
The API in the C runtime as well as in the Haskell, Python and Java binding
is changed. Now instead of adding the literal callbacks to the concrete syntax
you need to supply them every time when you need to parse. The main reason is:

- referentially transparent API for Haskell
- when we start using memory mapped files we will not be allowed to change
  anything in the grammar data structures. At that point the old API would
  be impossible to use.
2014-12-16 10:21:26 +00:00
kr.angelov
3e8e477652 update the nerc for the changes in the grammar 2014-12-11 21:54:34 +00:00
kr.angelov
e41ec32ba9 make sure that neither I nor I'm is recognized as name in English 2014-12-09 08:49:22 +00:00
kr.angelov
386ec87405 bugfix for unknown words 2014-12-08 19:38:03 +00:00
kr.angelov
d4b8281226 fix for the unknown words 2014-12-08 15:42:14 +00:00
kr.angelov
3fd53b907e added a callback for unknown words 2014-12-08 15:18:01 +00:00
kr.angelov
00922153aa CAPIT is now naturally supported in the C runtime 2014-10-22 15:05:55 +00:00
kr.angelov
86e9acc7a7 throw away the long obsolete runtime type information in the C runtime 2014-10-09 13:44:26 +00:00
kr.angelov
584d589041 a partial support for def rules in the C runtime
The def rules are now compiled to byte code by the compiler and then to
native code by the JIT compiler in the runtime. Not all constructions
are implemented yet. The partial implementation is now in the repository
but it is not activated by default since this requires changes in the
PGF format. I will enable it only after it is complete.
2014-08-11 10:59:10 +00:00
kr.angelov
abb50f9c73 added bracketedLinearize in the Java binding 2014-07-02 07:08:01 +00:00