1
0
forked from GitHub/gf-core

Compare commits

..

257 Commits

Author SHA1 Message Date
Thomas Hallgren
445aeb5f6b Final changes before the release of GF 3.9 2017-08-11 21:11:24 +02:00
Krasimir Angelov
788466082c more release notes about the runtime 2017-08-11 20:17:37 +02:00
Krasimir Angelov
d0404967a6 release notes about the lookup 2017-08-11 20:13:45 +02:00
Thomas Hallgren
7462da29c8 Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-11 16:05:44 +02:00
Thomas Hallgren
8a633c7f7d Some updates in index-next.t2t and release-next.t2t 2017-08-11 16:04:57 +02:00
Thomas Hallgren
bad11534a0 gf.cabal: don't enable warnings about unused imports by default 2017-08-11 15:45:19 +02:00
Thomas Hallgren
7b0deda45a Disable detailed version info from darcs
TODO: get version info from git instead.
2017-08-11 15:33:21 +02:00
Thomas Hallgren
97e61c27fb src/runtime/java/Makefile: fixes to find jni.h and jni_md.h in more cases 2017-08-11 15:09:28 +02:00
Thomas Hallgren
944bb5e61e A couple of fixes for GHC 8.2.1 compatibility 2017-08-11 10:07:43 +02:00
Aarne Ranta
2b55df09cc release notes on RGL and UD 2017-08-10 16:53:55 +02:00
Krasimir Angelov
833fd77f00 the linearizer API now allows to detect metavariables. This is used for instancein the lookup where the tokens produced from the metavariables are interpreted as distinct from all other tokens. 2017-08-07 16:39:19 +02:00
Krasimir Angelov
c08c44a17d fix the sentence lookup for cases when the top category is undefined. 2017-08-07 14:47:20 +02:00
Krasimir Angelov
ec4a11ce25 added org.grammaticalframework.pgf.Expr.unStr 2017-08-07 11:48:40 +02:00
Krasimir Angelov
47a4218d21 added the Expr.unMeta method in the Java binding 2017-07-07 11:21:34 +02:00
Inari Listenmaa
1b0a0013ae add SymbolicJpn 2017-07-04 16:26:31 +02:00
Inari Listenmaa
f3c12fc506 remove some redundant code from NounJpn 2017-07-04 16:23:28 +02:00
Inari Listenmaa
fb95d5103c add more time expressions to ConstructionJpn, and fill SymbolJpn (might be wrong though) functions. 2017-07-04 16:22:37 +02:00
Inari Listenmaa
a66b142848 Add weekdays and some weekday adverbs into ConstructionJpn 2017-07-03 14:26:26 +02:00
Thomas Hallgren
1d355d3f1a Merge branch 'master' of /usr/local/www/GF 2017-06-30 15:46:46 +02:00
Thomas Hallgren
e668df089e gf.cabal: update bug-reports and tested-with 2017-06-30 15:46:07 +02:00
Inari Listenmaa
3d1dd5efa9 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-06-30 15:31:23 +02:00
Inari Listenmaa
a49ce31f8d Fix punctuation to use SOFT_BIND and BIND in the whole RGL 2017-06-30 15:28:27 +02:00
Thomas Hallgren
af04fb6414 Updates to reflect the darcs->git move in the developer guide and the download page & release notes for the next release 2017-06-30 15:16:52 +02:00
Inari Listenmaa
f79e27c688 add a couple of words 2017-06-30 11:29:17 +02:00
Inari Listenmaa
5e46b5fd87 add a couple of give_Something verbs 2017-06-30 11:01:44 +02:00
Inari Listenmaa
2408d38956 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-06-29 20:14:32 +02:00
Inari Listenmaa
56cf7f6394 add a couple of give_Something verbs 2017-06-29 18:10:00 +02:00
Thomas Hallgren
9bad4e88c3 Link to the issue tracker on GitHub 2017-06-29 17:27:36 +02:00
Thomas Hallgren
974d205807 index.html: a quick news item about the move to GitHub 2017-06-29 15:15:52 +02:00
Thomas Hallgren
281fae2f82 gf.cabal: update the source repository to point to the GitHub repository 2017-06-29 14:51:27 +02:00
krasimir
0cb10ac35b filtering during the lookup nicely integrates with concretization 2017-06-27 19:30:43 +00:00
krasimir
45bff297c2 faster lookup 2017-06-23 17:52:43 +00:00
hallgren
4606a2a3a4 Adding preliminary release notes and download pages for the next release of GF
Feel free to add things to download/release-next.t2t.
2017-06-19 13:56:52 +00:00
aarne
d16a972e55 added V versions of IrregFre.*V2 verbs to make their library reuse easier 2017-06-15 12:57:41 +00:00
aarne
6d922dc945 added Arabic question mark to arabic and persian transliterations, as well as the zero-width non-joiner U+200C to persian" 2017-06-14 12:32:17 +00:00
inari
b551f858df fix a few VAs 2017-06-14 09:09:29 +00:00
krasimir
24866be6fb bugfixes in the Java binding 2017-06-10 19:31:06 +00:00
aarne
afd93c62fa some new functionalities in Ger 2017-06-05 12:46:53 +00:00
aarne
7900258691 added PartPlCN to ExtraFin 2017-06-04 10:30:15 +00:00
aarne
e427b38759 updated synopsis that now uses quicklinks 2017-06-02 15:05:26 +00:00
aarne
21e6663a3e handling combination of &+ and &| 2017-06-02 06:11:44 +00:00
aarne
4e56a16cab handling capitalization (&|) in unlexer -bind 2017-06-02 06:06:57 +00:00
hallgren
6ec31f029e Add a Quick Links menu to the Libary Synopsis web page.
The menu is generated dynamically by JavaScript functions defined in
quicklinks.js, by traversing the Detailed Table of Contents in the 
generated synopsis.html.
2017-06-01 18:21:52 +00:00
krasimir
3007072cc4 fix in the lookup debuger 2017-06-01 09:08:42 +00:00
krasimir
8176470e2a reintroduce counts as a prefilter before applying cosine similarity 2017-06-01 09:06:35 +00:00
krasimir
234a0d5e99 more debug information in the lookup 2017-06-01 08:27:02 +00:00
john.j.camilleri
92bbecf43e add links to the Java and .NET APIs from the home page 2017-05-31 19:10:03 +00:00
krasimir
8aede6b08a a bit more documentation copied from Java 2017-05-31 19:01:04 +00:00
krasimir
a96eb01fe5 bits of documentation for the .NET binding 2017-05-31 18:48:56 +00:00
krasimir
0b3ac637a5 .NET binding to GF by Bjørnar Luteberget 2017-05-31 13:48:36 +00:00
aarne
6e300ca9cb a typo in PhonoFre.voyelle prevented from recognizing ê as a vowel 2017-05-30 16:38:40 +00:00
krasimir
c154cdb649 lookup for syntagmatic words 2017-05-30 12:35:02 +00:00
krasimir
73728265e3 finally a smoothed and more precise ranking for lookups 2017-05-30 11:42:32 +00:00
krasimir
0b2dc074ac another fix for the compilation of the bindings to the runtime 2017-05-26 08:54:12 +00:00
krasimir
9f44fa89f2 an optimized string kernel 2017-05-24 19:44:32 +00:00
krasimir
aa836aa86d fix in linearizer.h to make the JAVA binding compile 2017-05-23 21:11:11 +00:00
krasimir
9ec86417cb an optimized expression extraction in the lookup 2017-05-23 21:06:17 +00:00
krasimir
fc3be2b937 a naive buf working ranking in the sentence lookup 2017-05-23 14:07:55 +00:00
krasimir
3eb7c464c3 bugfix in the stack handling during lookup 2017-05-16 10:55:00 +00:00
krasimir
1454c511cf bugfix in the Java binding 2017-05-15 08:45:40 +00:00
krasimir
df502afc2c add lookup.c to Android.mk 2017-05-13 11:23:19 +00:00
krasimir
9aa10a46bc switch off the debugging mode in the sentence lookup 2017-05-12 11:13:15 +00:00
krasimir
38ad3774e7 sentence lookup API from Java 2017-05-12 11:12:29 +00:00
krasimir
a35e3ebff7 bugfix in the sentence lookup 2017-05-12 10:51:49 +00:00
krasimir
e2b70c07ca a binding to the sentence lookup from Haskell 2017-05-12 09:32:25 +00:00
krasimir
77c472abca the first prototype for sentence lookup 2017-05-12 09:31:47 +00:00
krasimir
58fa086e10 just for fun: hashCode for expressions 2017-05-11 13:41:41 +00:00
krasimir
4b241790e6 an API for inspecting expressions in Java 2017-05-11 13:35:56 +00:00
krasimir
77a91bdd1a bugfix for print names in the C runtime and expose the functionality from Java 2017-05-11 09:11:30 +00:00
krasimir
f5c98af811 construction of Int and Float literals in the Java binding 2017-05-11 07:44:10 +00:00
krasimir
788124a96c added Expr.apply 2017-05-10 14:41:55 +00:00
krasimir
a9a6505eaf bugfix in the Java binding 2017-05-10 13:31:14 +00:00
hallgren
71b4ae3a0a PGFService.hs: fix problem when compiling without C run-time support
The previous patch introduced an indentation problem in the code that is used
when compiling without C run-time support.
2017-05-10 12:59:57 +00:00
krasimir
5f5190b175 a simple optimization for getCategories, getFunctions, getFunctionsByCat in the Java binding 2017-05-10 12:46:32 +00:00
krasimir
4a172bbb3e finished Type.getHypos & added Hypo.getType 2017-05-10 12:19:27 +00:00
krasimir
7455771d64 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
a3768695b3 some extensions in the conceptual editor needed for the SBAR app 2017-05-06 07:46:39 +00:00
aarne
9376ccfe62 concrete labels Eng and Swe completed for the demo grammar 2017-05-05 15:14:47 +00:00
hallgren
6a36dacee7 PGFService: add CncLabels support to command=deptree
CncLabels are read from a file in the same directory as the PGF file and
with the same name as the concrete syntax + extension .labels, 
e.g. ResourceDemo.pgf would use labels from

	ResouceDemo.labels	(abslabels)
	ResouceDemoEng.labels	(clclabels)
2017-05-05 14:01:02 +00:00
hallgren
9a3f8d0573 minibar_translations.js: remove dead code 2017-05-05 13:54:43 +00:00
krasimir
5c8b6d060c optimize memory allocation in the lookup by using worker pools 2017-05-04 08:29:51 +00:00
krasimir
c251da29dd remove duplicate entries from the lookup index 2017-05-04 08:21:29 +00:00
krasimir
830a083fd6 merging spines 2017-05-04 07:55:11 +00:00
aarne
9faacadf2c some fixes and new functionalities in Ita. Note: MassNP is now without "di" like in Spa and unlike in Fre 2017-05-02 16:08:54 +00:00
krasimir
fa6ee145d7 first steps for sentence lookup in the C runtime 2017-05-03 16:28:20 +00:00
aarne
51549d70c6 removed the bogus word Dictionary.like_Adv which created lots of bad translations 2017-05-03 09:33:07 +00:00
aarne
b952d207d1 fixed subject agreement with non-Nom case in ExtraFin.MkVPS 2017-04-24 13:34:43 +00:00
krasimir
52fdac4d2c add install pragma for CMake 2017-04-19 20:21:20 +00:00
krasimir
ba038914fa more changes to make the C runtime compilable with MSVC 2017-04-19 18:59:42 +00:00
aarne
07d72532fa updated android app help file 2017-04-19 17:26:51 +00:00
aarne
ddb2d7dd9d added a few very common words to DictionaryRus from the annotations by Anastasiia Tsukanova 2017-04-19 16:46:46 +00:00
krasimir
e57db940ef now the database with glosses is compiled on the PC by running glosses.hs. On the phone we just extract the database 2017-04-19 13:00:46 +00:00
krasimir
a03a99b9c7 in libgu mark explicitly all functions that belong to the API 2017-04-19 12:30:40 +00:00
krasimir
38dd190ff4 in the Java binding mark all internal functions as hidden 2017-04-19 11:08:09 +00:00
krasimir
d15a1a96e6 explicitly classify all functions in libpgf as either internal or API functions 2017-04-19 09:34:23 +00:00
krasimir
95984ad12a make some of the functions in the Python binding static 2017-04-19 09:45:15 +00:00
krasimir
9b2569a531 add the CMakeLists.txt from Bjørnar 2017-04-13 14:23:26 +00:00
krasimir
b645929abd disable doxygen 2017-04-13 14:11:47 +00:00
krasimir
72779503dd updated AUTHORS list in the C runtime 2017-04-13 14:00:45 +00:00
krasimir
1140f8f377 remove src/runtime/c/README it is obsolete anyway 2017-04-13 13:57:37 +00:00
krasimir
7ce0426400 use gu_string_buf_data in the Python binding to avoid copying 2017-04-13 13:47:13 +00:00
krasimir
0e8f0b9842 gu_string_buf -> gu_new_string_buf in libgu 2017-04-13 13:43:48 +00:00
krasimir
d3016421bb use gu_string_buf_data in the Java binding to avoid double copying of strings 2017-04-13 13:21:32 +00:00
krasimir
2c3cfc0b02 full support for Latin1 GF identifiers in the C runtime 2017-04-13 12:57:11 +00:00
krasimir
c73ab109a5 add gu_string_buf_data and gu_string_buf_length in libgu 2017-04-13 12:55:29 +00:00
krasimir
afdf54d333 silence a few warnings on MacOS 2017-04-13 11:07:08 +00:00
krasimir
5280202ac3 use GU_API_DATA_DECL instead of GU_API_DATA to make the C runtime compile again on MacOS 2017-04-13 11:06:24 +00:00
aarne
dcf7a34212 fixed ta_V in Swe and blad in Dut 2017-04-13 06:48:13 +00:00
aarne
173cd00873 Translator.java in android app now tries to find the lowercased first word in the lexicon if uppercased fails; added Est and Rus in the help file 2017-04-12 14:21:54 +00:00
krasimir
ee93c25d19 update SG.hsc 2017-04-12 11:55:27 +00:00
krasimir
4e19b1d510 remove the teyjus and utils folders 2017-04-12 10:31:01 +00:00
krasimir
3454812516 a patch from Bjørnar Luteberget for compatibility with MSVC 2017-04-12 10:24:56 +00:00
krasimir
be38ab9a2f some work on libsg queries 2017-04-12 10:05:22 +00:00
aarne
7c7ba408da commented out case_sensitive=off in App 2017-04-12 08:59:58 +00:00
aarne
9cdd5d3538 re-enabled Phrasebook in App ; added Russian ; testing with lower-casing the input 2017-04-11 15:48:18 +00:00
krasimir
0560180c67 upgrade Android SDK version 2017-04-11 13:40:02 +00:00
krasimir
bc84a54ca1 forgot src/ui/android/res/layout/fragment_phrase_list.xml 2017-04-11 12:54:23 +00:00
aarne
5a4937bd85 separated syncat multiwords in dep tree generation ; added function wildcards to concrete annotatations (see for instance english/LangEng.labels) 2017-04-06 15:40:44 +00:00
aarne
a81f25febe added concrete labels to Eng and Swe ; renamed uddeps.labels to Lang.labels for uniformity (these work also for ResourceDemo and Translate, however) 2017-04-06 15:39:49 +00:00
aarne
cf464af8b1 vd command now reads local concrete configurations to deal with syncat words; TODO: dissolve clustered multiwords bound with + 2017-04-06 11:55:21 +00:00
krasimir
92ab905be4 added generateOntology & generateOntologyDepth 2017-04-05 11:08:31 +00:00
m.t.n.de.rijk
57c2af29c2 fixed vowel lengthening in verbs like eten 2017-04-03 10:20:03 +00:00
aarne
1ad08d966c commented out the import of ConjunctionLat in LangLat: it belongs to GrammarLat 2017-03-28 07:42:30 +00:00
aarne
c09bf56ba2 RGL API files for Latin added 2017-03-28 07:40:37 +00:00
aarne
3a493d3d96 added module MissingLat to enable RGL API. At the end of the file, there is a comment saying how to reproduce this for new languages 2017-03-28 07:39:23 +00:00
aarne
73004aa142 enabled import of ConjunctionLat in GrammarLat to compile the API 2017-03-28 07:38:40 +00:00
aarne
edd5a0ca03 using MissingAra in ConstructorsAra so that we can now compile the RGL API for Arabic. When a function with not yet defined constants is used in an application, a compile time error reveals this. 2017-03-28 07:11:30 +00:00
aarne
d806e142da missing Arabic functions collected in MissingAra.gf with notYet definitions 2017-03-28 07:10:52 +00:00
aarne
d5f43d637c a constant Prelude.notYet to mark not yet implemented functions, with the purpose of enabling the compilation of the RGL API 2017-03-28 07:09:26 +00:00
aarne
3aa14435de fixed a bug in Eq instance generation for GADT and lexical categories 2017-03-22 22:25:21 +00:00
krasimir
e508b6e924 fix the compilation of sqlite3Btree.c on Windows 2017-03-14 11:07:14 +00:00
krasimir
55e975e47b a better error message 2017-03-07 23:17:24 +00:00
normundsg
34ed9afac0 News: GFSS 2017 2017-03-13 14:31:50 +00:00
krasimir
b2158cc2a0 added Predef.Float in Predef.gf 2017-03-07 20:12:56 +00:00
krasimir
ed45e0d9f4 GF.Compile.Compute.ConcreteNew now handles Predef.Float 2017-03-07 19:50:43 +00:00
krasimir
a8ba233986 bugfix in record subtyping checking 2017-03-07 17:53:56 +00:00
krasimir
01c4042901 remove dead code in ParadigmsEng.gf 2017-03-07 17:49:00 +00:00
krasimir
316c198e64 GF.Grammar.Printer now has a Terse mode which prints record types with lock fields with their corresponding abstract categories 2017-03-07 08:24:00 +00:00
krasimir
821bd7bf6e fix for EPatt 2017-03-06 17:15:46 +00:00
krasimir
0d08ec8756 type checking EPatt 2017-03-06 16:24:58 +00:00
krasimir
635faeeadd GF.Compile.Compute.ConcreteNew now can handle EPattType 2017-03-06 15:44:25 +00:00
krasimir
842df74cf5 some missing patterns 2017-03-06 14:44:03 +00:00
krasimir
04112682ec added overload resolution in the experimental type checker 2017-03-06 14:09:16 +00:00
krasimir
0debac9f98 some progress on the experimental type checker for the concrete syntax 2017-03-03 16:37:22 +00:00
aarne
fbce74dc16 corrected fg generation for lexical categories, to avoid a type error in generated code 2017-02-24 20:50:36 +00:00
hallgren
cc6755be33 Fix compilation errors caused by changes in PGF2
These prevented GF from being built with C run-time support (-fc-runtime).
2017-02-21 13:21:59 +00:00
krasimir
5905964c3e fix agree_with_V2 in Swedish 2017-02-21 13:15:03 +00:00
krasimir
187eca3e2e formatting in Dictionary.gf 2017-02-21 13:05:23 +00:00
krasimir
5ae210a500 more uniformity in Dictionary.gf 2017-02-17 15:27:17 +00:00
krasimir
72fc90d13e safer memory management in the Haskell binding 2017-02-10 17:10:37 +00:00
krasimir
a8cd866be0 gloss for london_PN in the dictionary 2017-02-10 14:10:20 +00:00
hallgren
6f23d6242e langcode.js: updated to include codes for recently added RGL languages 2017-02-10 12:18:36 +00:00
hallgren
940be1d6d6 GF home page: comment out the "GF build status" link
Gregoire's Jenkins server has been down since last summer...
2017-02-10 12:14:22 +00:00
krasimir
135e06f8d3 typo in gf-tutorial: enougo->enough 2017-02-01 14:59:35 +00:00
krasimir
ccca813993 replace .gfcc with .pgf in gf-refman.html 2017-02-01 10:48:48 +00:00
aarne
11bb43d2fc ambiguity in ExtraEst resolved 2017-01-30 22:18:02 +00:00
aarne
a4b9782481 typo in imports of SentencesPes corrected 2017-01-30 22:17:00 +00:00
aarne
1b1ff298fc DictionaryFin.unfortunately_Adv 2017-01-30 13:49:16 +00:00
aarne
30ba3476d1 qualified ambiguous NP in ExtraGer 2017-01-30 13:48:46 +00:00
aarne
07caa0b539 some renamings of internal types in Icelandic to avoid clashes 2017-01-30 13:46:02 +00:00
krasimir
4fae6e89a3 API for computing the Haskell binding 2017-01-26 18:41:07 +00:00
krasimir
22c10a1a27 use throwIO instead of throw in a few placed 2017-01-26 18:40:36 +00:00
krasimir
e47b8a1cbc type checking API in the Haskell binding 2017-01-26 14:09:07 +00:00
krasimir
cf1a1c3e3c a better implementation for PGF2.categories 2017-01-26 13:37:12 +00:00
krasimir
2b5194f2d2 now the Python API also accepts types as start categories. Using a string is still ok. 2017-01-26 13:31:08 +00:00
krasimir
d687413052 forgot to add src/runtime/haskell-bind/PGF2/Type.hsc 2017-01-26 13:00:22 +00:00
krasimir
74b0df2b6b bring the Haskell binding a bit closer to the pure Haskell API 2017-01-26 12:48:22 +00:00
Herbert Lange
0bbf27a5ed fixed clash between ResLat.mkAdv and ParadigmsLAt.mkAdv in latin lexicon 2017-01-26 12:06:32 +00:00
krasimir
99b88d0014 copy the types for BracketedString from the Haskell runtime to the Haskell bindings 2017-01-26 10:31:43 +00:00
krasimir
06450249e3 added mkMeta and unMeta in the Haskell binding 2017-01-26 10:17:02 +00:00
krasimir
47a4363d07 added mkAbs and unAbs in the Haskell binding 2017-01-26 10:04:42 +00:00
krasimir
45dd793f50 more startCat to the Types section in the Haddock documentation for the Haskell binding 2017-01-26 06:41:27 +00:00
krasimir
4442e302e6 add unStr,unInt and unFloat in the Haskell binding 2017-01-26 06:40:13 +00:00
krasimir
00f15826af improve the documentation for PGF2 2017-01-25 20:30:54 +00:00
krasimir
3279210cd7 add functionsByCat in the Haskell binding 2017-01-25 10:44:08 +00:00
krasimir
d747fcb897 bugfix in the Haskell binding 2017-01-25 10:37:34 +00:00
aarne
c491856776 baseline generation of DictLatEng from William Whitaker's Words - must be revisited 2017-01-24 10:51:35 +00:00
krasimir
f81651aa08 added linearizeAll in the Java API 2017-01-24 10:14:12 +00:00
krasimir
06b5edef91 resolve a conflict that was for some reason commited in src/runtime/java/Makefile 2017-01-24 09:36:39 +00:00
aarne
109cca464c added Ice and Nno to synopsis and ResourceDemo, and updated documentation 2017-01-19 19:58:48 +00:00
aarne
22dc784d73 BigLat = GrammarLat,DictLat 2017-01-19 15:40:20 +00:00
aarne
bd3ef6d502 script for building DictLat from William Whitaker's Words. Contains 35288 lemmas. 2017-01-19 14:56:43 +00:00
aarne
0d21175df1 added ParadigmsLat.mkAdv 2017-01-19 14:55:48 +00:00
bjatra5
07db1948a8 Icelandic added to RGL by Bjarki Traustason 2017-01-16 16:30:50 +00:00
john.j.camilleri
243d0837ec GF Summer school now links to the 2017 school (update from Normunds). 2017-01-05 21:51:03 +00:00
krasimir
fa5969a5be a new import script for Sloleks that takes into account the smart paradigms. this fills in the missing forms in Sloleks 2016-12-14 22:47:30 +00:00
krasimir
c14cc5dada smarter smart paradigms for Slovenian 2016-12-14 22:46:43 +00:00
krasimir
74e4f58b9c typos in the Slovenian grammar 2016-12-08 11:47:48 +00:00
krasimir
b75bca14de allow plural PNs in Slovenian 2016-12-06 11:39:56 +00:00
krasimir
0380ec8e17 added mkA with one argument in Slovenian 2016-12-05 21:47:57 +00:00
krasimir
5fdb9beaab added a catch all case in regNouns in Slovenian 2016-12-05 20:21:15 +00:00
aarne
f9507c6953 corrected the DType of NounChi.IndefArt to get the classifier right 2016-11-19 03:10:06 +00:00
aarne
67c72c0c82 Anna Ehrlemark's additional work on Slv 2016-11-11 07:45:16 +00:00
aarne
467153c737 extrapos field added in German UseComp 2016-11-06 18:11:31 +00:00
krasimir
2e66e6bfac added classify.hs for building dictionaries from WordNet 2016-10-29 09:29:24 +00:00
aarne
a533fc70d3 some more functions added to Slv by guessing and using Morgan Nilsson's grammar book 2016-10-04 16:17:07 +00:00
aarne
3e6f1f05f2 some hopefully straightforward additions to Slovenian, all marked with ----AR 2016-10-04 10:29:39 +00:00
aarne
58ecdf7cff a couple more generic structural words in LargeFin 2016-09-23 17:56:21 +00:00
aarne
d7f88e46eb LargeFin with no lexicon, but just one word in each category+inherent features; still incomplete 2016-09-23 12:32:51 +00:00
aarne
02358dbd80 added top-level punctuation to tagged Finnish 2016-09-22 19:49:26 +00:00
aarne
ce6ebf9330 added derivable adverbs to LargeFin (the tagged lexicon from Kotus) 2016-09-22 08:55:47 +00:00
aarne
bd60279dc0 Omorfi tagging mostly complete for open classes in Fin, some closed classes and syncat words missing 2016-09-22 08:23:04 +00:00
aarne
ddf24a0a4e refactored adjectives in StemFin to get correct tags in tagged/ 2016-09-22 06:33:43 +00:00
aarne
1eb83dad9e adapted most of the tags to UD parsebank notation in TagFin 2016-09-21 15:37:33 +00:00
aarne
a891f9fdc0 experimental LargeFin parsing grammar with Kotus lexicon and morphological tags. 2016-09-21 13:29:35 +00:00
aarne
f365ddab83 news on tech talk, nynorsk, and github mirror problems; contrib github to main meny 2016-09-21 12:40:18 +00:00
aarne
11978b4f29 tagged/LangFin.gf now compiles but conversion to tags is not yet complete 2016-09-21 12:28:09 +00:00
prasanth.kolachina
9a069e9c2b additions to Makefile for translate grammars 2016-09-19 10:45:56 +00:00
prasanth.kolachina
c9e3d0340d python examples compatible with both Python 2 and 3 2016-09-19 08:32:08 +00:00
aarne
7849184875 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
aarne
c4517a1166 fixed the inflection of DictionaryFin.escape_V2 2016-09-01 12:22:14 +00:00
aarne
47116254ed improving the smartness of ParadigmsFre.mkV, leading to over 200 improvements in DictionaryFre 2016-09-01 12:08:16 +00:00
krasimir
9a92e04210 some more words in LexiconSlv and StructuralSlv moved from Anna's grammar 2016-08-30 13:36:18 +00:00
krasimir
0dbfe723ef added UseComp and CompAP in Slovenian. This also implements the complicated word order 2016-08-30 13:16:44 +00:00
krasimir
500ff14f7b prodrop pronouns from Anna's grammar 2016-08-30 11:28:11 +00:00
krasimir
7abf13c0f8 an overloaded version of mkPN which takes advantage of the smart paradigms for nouns. also now we store only the singular forms for all PNs. added NounSlv.UsePN 2016-08-30 09:41:57 +00:00
krasimir
8d88c8b9f2 more nouns in LexiconSlv.gf from Anna's grammar 2016-08-30 09:06:36 +00:00
krasimir
a14c81c619 animacy is now used in syntax as well 2016-08-30 08:30:04 +00:00
krasimir
436d957684 Animacy is now stored and used in Mophology but not yet in syntax 2016-08-29 15:28:15 +00:00
krasimir
0c273701c4 added smart paradigms for Slovenian but without animacy 2016-08-29 15:03:34 +00:00
krasimir
d530b25513 a couple of entries in the Slovenian lexicon from Anna's MiniLexicon 2016-08-28 23:22:15 +00:00
krasimir
6af5e20343 smart paradigms for adjectives adapted from Anna Ehrlemark. The adaptation is not perfect because it includes syncretic forms 2016-08-28 23:11:22 +00:00
krasimir
7f5414868d fix for the Slovenian imperatives 2016-08-28 21:01:52 +00:00
krasimir
67aa219748 smart paradigms for verbs in Slovenian from Anna Ehrlemark 2016-08-28 20:19:11 +00:00
krasimir
b13866e3ef conjunction in Slovenian 2016-08-16 10:35:30 +00:00
krasimir
a70ca7a35e added one more overloaded version of mkV2 in Slovenian 2016-08-16 07:51:30 +00:00
krasimir
5268fc0a7d added genitive case in the Slovenian API 2016-08-16 07:51:10 +00:00
krasimir
30de69f266 AdvVP in Slovenian 2016-08-15 21:24:52 +00:00
krasimir
16ce566c7a this_Quant and that_Quant. inflected possesive pronouns in Slovenian 2016-08-15 20:52:37 +00:00
krasimir
3609202c52 implemented negation in Slovenian based on Anna Ehrlemark's mini resource 2016-08-11 09:44:13 +00:00
krasimir
690f4a17f9 added love_V2 in LexiconSlv.gf 2016-08-11 09:43:44 +00:00
krasimir
d2c975a1f0 update the Python tutorial to be compatible with Python3 2016-08-01 10:55:57 +00:00
krasimir
64d4c061c2 python2 is now supported. the patch is based on a contribution from Vinit Ravishankar 2016-08-01 10:39:54 +00:00
krasimir
75319b602f two memory leaks in the Python bindings 2016-08-01 10:31:37 +00:00
krasimir
22eeffa271 added/checked a few words in Bulgarian 2016-07-29 11:54:23 +00:00
krasimir
6e28f4e186 two more phrasal verbs in Bulgarian 2016-07-29 11:54:06 +00:00
krasimir
b5c803b52c merge teetotaler_N and teetotaller_N 2016-07-29 11:52:56 +00:00
krasimir
c60860201b mark teapot_N as checked in Bulgarian 2016-07-29 11:41:39 +00:00
krasimir
a8fc2606e8 split stainless_A 2016-07-29 11:40:55 +00:00
krasimir
ab28313255 add offline_A in Bulgarian 2016-07-29 11:40:33 +00:00
krasimir
2707222048 fix teacherFem_N in Bulgarian 2016-07-29 11:39:32 +00:00
krasimir
f334ff015e fix in topics.txt 2016-07-20 05:36:39 +00:00
krasimir
0575671e2c extended topics.txt 2016-07-20 05:11:51 +00:00
krasimir
a4f6ec2975 a few more changes in the dictionaries 2016-07-20 04:27:47 +00:00
krasimir
1962ef14bd a few more changes in the dictionaries 2016-07-18 19:42:24 +00:00
krasimir
b0201bbb0b more splits and fixes in the dictionaries 2016-07-18 13:42:51 +00:00
inari
c7c3690510 fix go_under_V 2016-07-15 10:56:06 +00:00
hallgren
4d86f4d9a9 gf.cabal: bump version to 3.8-darcs 2016-07-05 10:27:00 +00:00
krasimir
46d617ecc5 ill_Adv -> ill_AdV 2016-07-05 09:51:08 +00:00
krasimir
8fae09f325 add ready_VP in Constructions 2016-07-05 09:49:30 +00:00
krasimir
c0fd96061a added scared_VP & ill_VP. fixed scared_A and ill_A in the general dictionaries of some languages 2016-07-05 06:22:06 +00:00
krasimir
ea2ab70d2a fixes in the translation dictionaries based on the data in the phrasebook 2016-07-04 21:18:43 +00:00
krasimir
7678ef4c62 fixes in DictionaryBul.gf 2016-07-04 21:17:34 +00:00
krasimir
060198d297 fixes in the glosses of mule_over_V2 and understand_V 2016-07-04 21:16:49 +00:00
krasimir
10378917ff added tired_VP in Constructions 2016-07-04 21:15:00 +00:00
krasimir
348623db29 more splits and some more fixes 2016-06-23 21:26:08 +00:00
aarne
1448ed8529 rbmt summer school announcement 2016-06-26 09:08:30 +00:00
459 changed files with 105739 additions and 37994 deletions

View File

@@ -214,6 +214,7 @@ langsCoding = [
(("hebrew", "Heb"),""),
(("hindi", "Hin"),"to_devanagari"),
(("german", "Ger"),""),
(("icelandic","Ice"),""),
(("interlingua","Ina"),""),
(("italian", "Ita"),""),
(("japanese", "Jpn"),""),
@@ -223,6 +224,7 @@ langsCoding = [
(("mongolian","Mon"),""),
(("nepali", "Nep"),""),
(("norwegian","Nor"),""),
(("nynorsk", "Nno"),""),
(("persian", "Pes"),""),
(("polish", "Pol"),""),
(("punjabi", "Pnb"),""),
@@ -246,7 +248,7 @@ langsLang = langs -- `except` ["Amh","Ara","Lat","Tur"]
--langsLang = langs `only` ["Fin"] --test
-- languagues that have notpresent marked
langsPresent = langsLang `except` ["Afr","Chi","Gre","Heb","Jpn","Mlt","Mon","Nep","Pes","Snd","Tha","Thb","Est"]
langsPresent = langsLang `except` ["Afr","Chi","Gre","Heb","Ice","Jpn","Mlt","Mon","Nep","Pes","Snd","Tha","Thb","Est"]
-- languages for which to compile Try
langsAPI = langsLang `except` langsIncomplete -- ["Ina","Amh","Ara"]
@@ -254,7 +256,7 @@ langsAPI = langsLang `except` langsIncomplete -- ["Ina","Amh","Ara"]
langsIncomplete = ["Amh","Ara","Grc","Heb","Ina","Lat","Tur"]
-- languages for which to compile Symbolic
langsSymbolic = langsAPI `except` ["Afr","Jpn","Mon","Nep"]
langsSymbolic = langsAPI `except` ["Afr","Ice","Jpn","Mon","Nep"]
-- languages for which to run demo test
langsDemo = langsLang `except` ["Ara","Hin","Ina","Lav","Tha"]

0
bin/build-binary-dist.sh Normal file → Executable file
View File

0
bin/gfmap Normal file → Executable file
View File

0
bin/update_html Normal file → Executable file
View File

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
gf (3.9-1) vivid xenial zesty; urgency=low
* GF 3.9
-- Thomas Hallgren <hallgren@chalmers.se> Fri, 11 Aug 2017 20:00:00 +0200
gf (3.8-1) precise trusty vivid; urgency=low
* GF 3.8

View File

@@ -23,15 +23,15 @@ you are a GF user who just wants to download and install GF
== Setting up your system for building GF ==
To build GF from source you need to install some tools on your
system: the //Haskell Platform//, //Darcs// and the //Haskeline library//.
system: the //Haskell Platform//, //Git// and the //Haskeline library//.
**On Linux** the best option is to install the tools via the standard
software distribution channels, i.e. by using the //Software Center//
in Ubuntu or the corresponding tool in other popular Linux distributions.
Or, from a Terminal window, the following command should be enough:
- On Ubuntu: ``sudo apt-get install haskell-platform darcs libghc6-haskeline-dev``
- On Fedora: ``sudo yum install haskell-platform darcs ghc-haskeline-devel``
- On Ubuntu: ``sudo apt-get install haskell-platform git libghc6-haskeline-dev``
- On Fedora: ``sudo dnf install haskell-platform git ghc-haskeline-devel``
**On Mac OS and Windows**, the tools can be downloaded from their respective
@@ -40,7 +40,7 @@ web sites, as described below.
=== The Haskell Platform ===
GF is written in Haskell, so first of all you need
the //Haskell Platform//, e.g. version 7.10.3. Downloads
the //Haskell Platform//, e.g. version 8.0.2 or 7.10.3. Downloads
and installation instructions are available from here:
http://hackage.haskell.org/platform/
@@ -54,7 +54,7 @@ This command should show you which version of GHC you have. If the installation
of the Haskell Platform was successful you should see a message like:
```
The Glorious Glasgow Haskell Compilation System, version 7.8.3
The Glorious Glasgow Haskell Compilation System, version 8.0.2
```
Other required tools included in the Haskell Platform are
@@ -63,17 +63,23 @@ Other required tools included in the Haskell Platform are
and
[Happy http://www.haskell.org/happy/].
=== Darcs ===
%=== Darcs ===
%
%To get the GF source code, you also need //Darcs//, version 2 or later.
%Darcs 2.10 is recommended (July 2015).
%
%//Darcs//
%is a distributed version control system, see http://darcs.net/ for
%more information. There are precompiled packages for many platforms
%available and source code if you want to compile it yourself. Darcs
%is also written in Haskell and so you can use GHC to compile it.
To get the GF source code, you also need //Darcs//, version 2 or later.
Darcs 2.10 is recommended (July 2015).
//Darcs//
is a distributed version control system, see http://darcs.net/ for
more information. There are precompiled packages for many platforms
available and source code if you want to compile it yourself. Darcs
is also written in Haskell and so you can use GHC to compile it.
=== Git ===
To get the GF source code, you also need //Git//.
//Git// is a distributed version control system, see
https://git-scm.com/downloads for more information.
=== The haskeline library ===
@@ -83,7 +89,7 @@ extra step is needed to make sure the C libraries (terminfo)
required by //haskeline// are installed. Here is one way to do this:
- On Ubuntu: ``sudo apt-get install libghc-haskeline-dev``
- On Fedora: ``sudo yum install ghc-haskeline-devel``
- On Fedora: ``sudo dnf install ghc-haskeline-devel``
== Getting the source ==
@@ -102,10 +108,10 @@ GF then you should consider getting read-write access.
Anyone can get the latest development version of GF by running (all on one line):
```
$ darcs get --lazy --set-scripts-executable http://www.grammaticalframework.org/ gf
$ git clone https://github.com/GrammaticalFramework/GF.git
```
This will create a directory called ``gf`` in the current
This will create a directory called ``GF`` in the current
directory.
@@ -113,11 +119,10 @@ directory.
To get all new patches from the main repo:
```
$ darcs pull -a
$ git pull
```
This can be done anywhere in your local repository, i.e. in the ``gf``
directory, or any of its subdirectories.
Without ``-a``, you can choose which patches you want to get.
==== Recording local changes ====[record]
@@ -129,13 +134,13 @@ If you have added files, you first need to tell your local repository to
keep them under revision control:
```
$ darcs add file1 file2 ...
$ git add file1 file2 ...
```
To record changes, use:
```
$ darcs record
$ git commit file1 file2 ...
```
This creates a patch against the previous version and stores it in your
@@ -143,105 +148,51 @@ local repository. You can record any number of changes before
pushing them to the main repo. In fact, you don't have to push them at
all if you want to keep the changes only in your local repo.
If you think there are too many questions about what to record, you
can answer ``f`` to record all remaining changes in the current file,
or ``s`` to skip them. Use ``?`` to get a list of more options.
%use the ``-a`` flag to ``record``. Or answer ``a`` to the first
%question. Both of these record all the changes you have in your local
%repository.
==== Submitting patches ====
If you are using read-only access, send your patches by email to
someone with write-access. First record your changes in your local
repository, as described above. You can send any number of recorded
patches as one patch bundle. You create the patch bundle with:
```
$ darcs send -o mypatch.patch
$ gzip mypatch.patch
```
(where ``mypatch`` is hopefully replaced by a slightly more
descriptive name). Since some e-mail setups change text attachments
(most likely by changing the newline characters) you need to send
the patch in some compressed format, such as GZIP, BZIP2 or ZIP.
Send it as an e-mail attachment.
% If you have
%sendmail or something equivalent installed, it is possible to send the
%patch directly from darcs. If so, replace ``-o mypatch.patch`` with
%``--to=EMAIL`` where ``EMAIL`` is the address to send it to.
Instead of enumerating all modified files on the command line,
you can use the flag ``-a`` to automatically record //all// modified
files. You still need to use ``git add`` to add new files.
%==== Submitting patches ====
%
%If you are using read-only access, send your patches by email to
%someone with write-access. First record your changes in your local
%repository, as described above. You can send any number of recorded
%patches as one patch bundle. You create the patch bundle with:
%
%```
%$ darcs send -o mypatch.patch
%$ gzip mypatch.patch
%```
%
%(where ``mypatch`` is hopefully replaced by a slightly more
%descriptive name). Since some e-mail setups change text attachments
%(most likely by changing the newline characters) you need to send
%the patch in some compressed format, such as GZIP, BZIP2 or ZIP.
%
%Send it as an e-mail attachment.
%% If you have
%%sendmail or something equivalent installed, it is possible to send the
%%patch directly from darcs. If so, replace ``-o mypatch.patch`` with
%%``--to=EMAIL`` where ``EMAIL`` is the address to send it to.
=== Read-write access ===
If you have a user account on ``www.grammaticalframework.org``, you can
get read-write access over SSH to the GF repository.
==== Getting a fresh copy ====
Get your copy with (all on one line),
replacing ``user`` with your own user name on ``www.grammaticalframework.org``:
If you are a member of the GF project on GitHub, you can push your
changes directly to the GF git repository on GitHub.
```
$ darcs get --lazy --set-scripts-executable user@www.grammaticalframework.org:/usr/local/www/GF/ gf
$ git push
```
The option ``--lazy`` means that darcs defers downloading all the
history for the repository. This saves space, bandwidth and CPU time,
and most people don't need the full history of all changes in the
past.
It is also possible for anyone else to contribute by
- creating a fork of the GF repository on GitHub,
- working with local clone of the fork (obtained with ``git clone``),
- pushing changes to the fork,
- and finally sending a pull request.
==== Updating your copy ====
Get all new patches from the main repo:
```
$ darcs pull
```
You can add ``-a`` to get all patches without answering yes/no to each patch.
==== Commit your changes ====
There are two steps to commiting a change to the main repo. First you
have to record the changes that you want to commit
(see [Recording local changes #record] above), then you push them
to the main repo. If you are using ssh-access, all you need to do is:
```
$ darcs push
```
If you use the ``-a`` flag to push, all local patches which are not in
the main repo are pushed.
==== Apply a patch from someone else ====
Use:
```
$ darcs apply < mypatch.patch
```
This applies the patch to your local repository. To commit it to the
main repo, use ``darcs push``.
=== Further information about Darcs ===
For more info about what you can do with darcs, see http://darcs.net/manual/
== Compilation from source with Cabal ==
@@ -542,7 +493,7 @@ This is possible, but the procedure has not been automated.
It involves using the cabal-rpm tool,
```
sudo yum install cabal-rpm
sudo dnf install cabal-rpm
```
and following the Fedora guide

View File

@@ -339,8 +339,8 @@ as explained <a href="#oldgf">here</a>.
Every source file, suffixed <CODE>.gf</CODE>, is compiled to a "GF object file",
suffixed <CODE>.gfo</CODE> (as of GF Version 3.0 and later). For runtime grammar objects
used for parsing and linearization, a set of <CODE>.gfo</CODE> files is linked to
a single file suffixed <CODE>.gfcc</CODE>. While <CODE>.gf</CODE> and <CODE>.gfo</CODE> files may contain
modules of any kinds, a <CODE>.gfcc</CODE> file always contains a multilingual grammar
a single file suffixed <CODE>.pgf</CODE>. While <CODE>.gf</CODE> and <CODE>.gfo</CODE> files may contain
modules of any kinds, a <CODE>.pgf</CODE> file always contains a multilingual grammar
with one abstract and a set of concrete syntaxes.
</P>
<P>
@@ -358,10 +358,10 @@ The following diagram summarizes the files involved in the compilation process.
==>
</P>
<P>
grammar.gfcc
grammar.pgf
</center>
Both <CODE>.gf</CODE> and <CODE>.gfo</CODE> files are written in the GF source language;
<CODE>.gfcc</CODE> files are written in a lower-level format. The process of translating
<CODE>.pgf</CODE> files are written in a lower-level format. The process of translating
<CODE>.gf</CODE> to <CODE>.gfo</CODE> consists of <B>name resolution</B>, <B>type annotation</B>,
<B>partial evaluation</B>, and <B>optimization</B>.
There is a great advantage in the possibility to do this
@@ -3151,7 +3151,7 @@ modules, and therefore does not need to be opened explicitly.
</P>
<P>
The flag <CODE>coding</CODE> in concrete syntax sets the <B>character encoding</B>
used in the grammar. Internally, GF uses unicode, and <CODE>.gfcc</CODE> files
used in the grammar. Internally, GF uses unicode, and <CODE>.pgf</CODE> files
are always written in UTF8 encoding. The presence of the flag
<CODE>coding=utf8</CODE> prevents GF from encoding an already encoded
file.

View File

@@ -41,7 +41,7 @@ which respresents the language.
For example the following will extract the English language:
<pre class="code">
>>> eng = gr.languages["AppEng"]
>>> print eng
>>> print(eng)
&lt;pgf.Concr object at 0x7f7dfa4471d0&gt;
</pre>
@@ -58,18 +58,22 @@ abstract trees. You can get the next tree by calling next:
<pre class="code">
>>> p,e = i.next()
</pre>
or by calling __next__ if you are using Python 3:
<pre class="code">
>>> p,e = i.__next__()
</pre>
The results are always pairs of probability and tree. The probabilities
are negated logarithmic probabilities and which means that the lowest
number encodes the most probable result. The possible trees are
returned in decreasing probability order (i.e. increasing negated logarithm).
The first tree should have the smallest <tt>p</tt>:
<pre class="code">
>>> print p
>>> print(p)
35.9166526794
</pre>
and this is the corresponding abstract tree:
<pre class="code">
>>> print e
>>> print(e)
PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetNP (DetQuant this_Quant NumSg)) (UseComp (CompNP (DetCN (DetQuant IndefArt NumSg) (AdjCN (PositA small_A) (UseN theatre_N)))))))) NoVoc
</pre>
@@ -116,7 +120,7 @@ a new expression like this:
</pre>
and then we can linearize it:
<pre class="code">
>>> print eng.linearize(e)
>>> print(eng.linearize(e))
red theatre
</pre>
This method produces only a single linearization. If you use variants
@@ -124,7 +128,7 @@ in the grammar then you might want to see all possible linearizations.
For that purpouse you should use linearizeAll:
<pre class="code">
>>> for s in eng.linearizeAll(e):
print s
print(s)
red theatre
red theater
</pre>
@@ -140,7 +144,7 @@ Finally, you could also get a linearization which is bracketed into
a list of phrases:
<pre class="code">
>>> [b] = eng.bracketedLinearize(e)
>>> print b
>>> print(b)
(CN:4 (AP:1 (A:0 red)) (CN:3 (N:2 theatre)))
</pre>
Each bracket is actually an object of type pgf.Bracket. The property
@@ -158,7 +162,7 @@ will just see the name of the function in the generated string.
It is sometimes helpful to be able to see whether a function
is linearizable or not. This can be done in this way:
<pre class="code">
>>> print eng.hasLinearization("apple_N")
>>> print(eng.hasLinearization("apple_N"))
</pre>
<h2>Analysing and Constructing Expressions</h2>
@@ -199,11 +203,11 @@ to call the method <tt>default</tt>. The following is an example:
<pre class="code">
>>> class ExampleVisitor:
def on_DetCN(self,quant,cn):
print "Found DetCN"
print("Found DetCN")
cn.visit(self)
def on_AdjCN(self,adj,cn):
print "Found AdjCN"
print("Found AdjCN")
cn.visit(self)
def default(self,e):
@@ -228,7 +232,7 @@ using the constructor for <tt>pgf.Expr</tt>:
<pre class="code">
>>> quant = pgf.readExpr("DetQuant IndefArt NumSg")
>>> e2 = pgf.Expr("DetCN", [quant, e])
>>> print e2
>>> print(e2)
DetCN (DetQuant IndefArt NumSg) (AdjCN (PositA red_A) (UseN theatre_N))
</pre>
@@ -250,7 +254,7 @@ After that you can simply import the module:
Now creating new trees is just a matter of calling ordinary Python
functions:
<pre class="code">
>>> print App.DetCN(quant,e)
>>> print(App.DetCN(quant,e))
DetCN (DetQuant IndefArt NumSg) (AdjCN (PositA red_A) (UseN house_N))
</pre>
@@ -262,12 +266,12 @@ The following code just iterates over the lexicon and prints each
word form with its possible analyses:
<pre class="code">
for entry in eng.fullFormLexicon():
print entry
print(entry)
</pre>
The second one implements a simple lookup. The argument is a word
form and the result is a list of analyses:
<pre class="code">
print eng.lookupMorpho("letter")
print(eng.lookupMorpho("letter"))
[('letter_1_N', 's Sg Nom', inf), ('letter_2_N', 's Sg Nom', inf)]
</pre>
@@ -291,7 +295,7 @@ You can also access all functions with the same result category:
</pre>
The full type of a function can be retrieved as:
<pre class="code">
>>> print gr.functionType("DetCN")
>>> print(gr.functionType("DetCN"))
Det -> CN -> NP
</pre>
@@ -302,9 +306,9 @@ for simple types. Dependent types are still not fully implemented
in the current runtime. The inference is done with method <tt>inferExpr</tt>:
<pre class="code">
>>> e,ty = gr.inferExpr(e)
>>> print e
>>> print(e)
AdjCN (PositA red_A) (UseN theatre_N)
>>> print ty
>>> print(ty)
CN
</pre>
The result is a potentially updated expression and its type. In this
@@ -316,7 +320,7 @@ wouldn't be true when dependent types are added.
<p>Type checking is also trivial:
<pre class="code">
>>> e = gr.checkExpr(e,pgf.readType("CN"))
>>> print e
>>> print(e)
AdjCN (PositA red_A) (UseN theatre_N)
</pre>
In case of type error you will get an exception:
@@ -359,7 +363,7 @@ pgf.PGFError: The concrete syntax is not loaded
Before using the concrete syntax, you need to explicitly load it:
<pre class="code">
>>> eng.load("AppEng.pgf_c")
>>> print eng.lookupMorpho("letter")
>>> print(eng.lookupMorpho("letter"))
[('letter_1_N', 's Sg Nom', inf), ('letter_2_N', 's Sg Nom', inf)]
</pre>
@@ -376,7 +380,7 @@ In both cases the result is a GraphViz code that can be used for
rendering the trees. See the examples bellow.
<pre class="code">
>>> print gr.graphvizAbstractTree(e)
>>> print(gr.graphvizAbstractTree(e))
graph {
n0[label = "AdjCN", style = "solid", shape = "plaintext"]
n1[label = "PositA", style = "solid", shape = "plaintext"]
@@ -391,7 +395,7 @@ n0 -- n3 [style = "solid"]
</pre>
<pre class="code">
>>> print eng.graphvizParseTree(e)
>>> print(eng.graphvizParseTree(e))
graph {
node[shape=plaintext]

View File

@@ -5581,7 +5581,7 @@ The generated Haskell module also contains
_ -&gt; error ("no Question " ++ show t)
</PRE>
<P>
For the programmer, it is enougo to know:
For the programmer, it is enough to know:
</P>
<UL>
<LI>all GF names are in Haskell prefixed with <CODE>G</CODE>

View File

@@ -4810,7 +4810,7 @@ instance Gf GQuestion where
DTr [] (AC (CId "Prime")) [x1] -> GPrime (fg x1)
_ -> error ("no Question " ++ show t)
```
For the programmer, it is enougo to know:
For the programmer, it is enough to know:
- all GF names are in Haskell prefixed with ``G``
- ``gf`` translates from Haskell objects to GF trees
- ``fg`` translates from GF trees to Haskell objects

178
download/index-3.8.t2t Normal file
View File

@@ -0,0 +1,178 @@
Grammatical Framework Download and Installation
%!style:../css/notes.css
%!postproc(html): <TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>
%!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>
%!postproc(html): <TD><I> <TD><small>
%!postproc(html): </I></TD> </small></TD>
**GF 3.8** was released on 22 June 2016.
What's new? See the [Release notes release-3.8.html].
== Binary packages ==
|| Platform | Download | Features | How to install
| Mac OS X | [gf-3.8.pkg gf-3.8.pkg] | //GF+S+C+P// | Double-click on the package icon (*)
| Mac OS X | [gf-3.8-bin-intel-mac.tar.gz gf-3.8-bin-intel-mac.tar.gz] | //GF+S+C+P// | ``sudo tar -C /usr/local -zxf gf-3.8-bin-intel-mac.tar.gz``
%| Fedora (32-bit) | [Fedora RPMs /~hallgren/tmp/Fedora/] | //GF+S+C+J+P// | ``sudo rpm -i ...``
| Ubuntu (32-bit) | [gf_3.8-1_i386.deb gf_3.8-1_i386.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.8-1_i386.deb``
| Ubuntu (64-bit) | [gf_3.8-1_amd64.deb gf_3.8-1_amd64.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.8-1_amd64.deb``
| Windows | [gf-3.8-bin-windows.zip gf-3.8-bin-windows.zip] | //GF+S// | ``unzip gf-3.8-bin-windows.zip``
%| MINGW | [gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz] | //GF+S+C// | ``tar -C / gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz``
%| ... | ... | ... | ...
Features: GF = GF shell and grammar compiler and the Resource Grammar Library,
S = ``gf -server`` mode,
C = C run-time system,
J/P = Java/Python binding to the C run-time system
%More binary packages might be added later.
===Notes===
The Windows package is installed by just unpacking it anywhere.
%It finds the libraries relative to the ``.exe`` file.
You will probably need to set the ``PATH`` and ``GF_LIB_PATH`` environment
variables, see Inari's notes on
[Installing GF on Windows http://www.grammaticalframework.org/~inari/gf-windows.html#toc3].
%The new experimental MINGW package is for use in the
%[MINGW http://www.mingw.org] environment in Windows. Unpack it in the MSYS shell
%(which is started with ``C:\MinGW\msys\1.0\msys.bat``).
%It should work out of the box without any additional settings.
The ``.deb`` packages should work on Ubuntu 12.04, 14.04 and 16.04 and similar
Linux distributions.
The packages for Mac OS X should work on at least 10.9, 10.10 and 10.11 (Mavericks, Yosemite and El Capitan).
(*) **Note** that for compatibility with OS X 10.11,
``gf-3.8.pkg`` will install the ``gf`` executable in ``/usr/local/bin``
instead of ``/usr/bin``, so make sure ``/usr/local/bin`` is in your ``$PATH``.
Also, if you still have an older version of GF installed in ``/usr/bin``,
remove it and/or make sure ``/usr/local/bin`` comes before ``/usr/bin``
in your ``$PATH`` so you don't accidentally run the old version.
The Mac OS and Linux ``.tar.gz`` packages are designed to be installed in
``/usr/local``.
You can install them in other locations, but then you need to set the
``GF_LIB_PATH`` environment variable:
```
export GF_LIB_PATH=/usr/local/share/gf-3.8/lib
```
where ``/usr/local`` should be replaced with the path to the location where you
unpacked the package.
==Installing the latest release from source==
[GF is on Hackage http://hackage.haskell.org/package/gf], so under normal
circumstances the prodedure is fairly simple:
+ Install a recent version of the
[Haskell Platform http://hackage.haskell.org/platform],
e.g. version 7.10.3 (see note 2 below)
+ ``cabal update``
+ On Linux: install some C libraries from your Linux distribution
(see note 1 below)
+ ``cabal install gf``
You can also download the full source package from here:
[``gf-3.8.tar.gz`` gf-3.8.tar.gz].
=== Notes ===
The above steps installs GF for a single user.
% and does not require root privileges.
The executables are put in ``$HOME/.cabal/bin``
(or, with recent versions of the Haskell platform on Mac OS X,
in ``$HOME/Library/Haskell/bin``), so it is a good
idea to put a line in your ``.bash_profile`` or ``.profile``
to add that directory to you path:
```
PATH=$HOME/.cabal/bin:$PATH
```
or
```
PATH=$HOME/Library/Haskell/bin:$PATH
```
**Note 1**.
GF uses [``haskeline`` http://hackage.haskell.org/package/haskeline], which
on Linux depends on some non-Haskell libraries that
won't be installed automatically by cabal, and therefore need to be installed
manually. Here is one way to do this:
- On Ubuntu: ``sudo apt-get install libghc-haskeline-dev``
- On Fedora: ``sudo yum install ghc-haskeline-devel``
**Note 2**.
The GF source code has been updated to compile with GHC 8.0.1. Using older
versions of GHC (7.10.3, 7.10.2, 7.8, 7.6) should work too.
=== Known problems ===
There seems to be a bug in some versions of Cabal that can cause
```
Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed
```
if the same version of GF is
already installed. If you encounter this, you can use ``ghc-pkg unregister gf``
to remove the installed version of GF and ``ghc-pkg list gf`` to verify that
it is gone.
==Installing from the latest developer source code==
The first time:
%, assuming you already have the Haskell Platform and darcs
```
darcs get --lazy http://www.grammaticalframework.org/ GF
cd GF
cabal install
```
Subsequently:
```
cd GF
darcs pull -a
cabal install
```
Alternatively, you can get the code from the
[GF GitHub https://github.com/GrammaticalFramework/GF/] mirror, which is
updated nightly.
The above notes for installing from source apply also in these cases.
For more info on working with the GF source code, see the
[GF Developers Guide ../doc/gf-developers.html].
==Older releases==
- [GF 3.7.1 index-3.7.1.html] (October 2015)
- [GF 3.7 index-3.7.html] (June 2015)
- [GF 3.6 index-3.6.html] (June 2014)
- [GF 3.5 index-3.5.html] (August 2013)
- [GF 3.4 index-3.4.html] (January 2013).
- [GF 3.3.3 index-3.3.3.html] (March 2012).
- [GF 3.3 index-3.3.html] (October 2011).
- [GF 3.2.9 index-3.2.9.html] source-only snapshot (September 2011).
- [GF 3.2 index-3.2.html] (December 2010).
- [GF 3.1.6 index-3.1.6.html] (April 2010).
- [GF 3.1 old-index.html] (December 2009).
--------------------
[www.grammaticalframework.org http://www.grammaticalframework.org]

View File

@@ -7,21 +7,22 @@ Grammatical Framework Download and Installation
%!postproc(html): <TD><I> <TD><small>
%!postproc(html): </I></TD> </small></TD>
**GF 3.8** was released on 22 June 2016.
**GF 3.9** was released on 11 August 2017.
What's new? See the [Release notes release-3.8.html].
What's new? See the [Release notes release-3.9.html].
== Binary packages ==
|| Platform | Download | Features | How to install
| Mac OS X | [gf-3.8.pkg gf-3.8.pkg] | //GF+S+C+P// | Double-click on the package icon (*)
| Mac OS X | [gf-3.8-bin-intel-mac.tar.gz gf-3.8-bin-intel-mac.tar.gz] | //GF+S+C+P// | ``sudo tar -C /usr/local -zxf gf-3.8-bin-intel-mac.tar.gz``
| macOS | [gf-3.9.pkg gf-3.9.pkg] | //GF+S+C+J+P// | Double-click on the package icon
| macOS | [gf-3.9-bin-intel-mac.tar.gz gf-3.9-bin-intel-mac.tar.gz] | //GF+S+C+J+P// | ``sudo tar -C /usr/local -zxf gf-3.9-bin-intel-mac.tar.gz``
%| Fedora (32-bit) | [Fedora RPMs /~hallgren/tmp/Fedora/] | //GF+S+C+J+P// | ``sudo rpm -i ...``
| Ubuntu (32-bit) | [gf_3.8-1_i386.deb gf_3.8-1_i386.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.8-1_i386.deb``
| Ubuntu (64-bit) | [gf_3.8-1_amd64.deb gf_3.8-1_amd64.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.8-1_amd64.deb``
| Windows | [gf-3.8-bin-windows.zip gf-3.8-bin-windows.zip] | //GF+S// | ``unzip gf-3.8-bin-windows.zip``
%| MINGW | [gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz] | //GF+S+C// | ``tar -C / gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz``
%| Raspian 8.0 | [gf_3.9-1_armhf.deb gf_3.9-1_armhf.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.9-1_armhf.deb``
| Ubuntu (32-bit) | [gf_3.9-1_i386.deb gf_3.9-1_i386.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.9-1_i386.deb``
| Ubuntu (64-bit) | [gf_3.9-1_amd64.deb gf_3.9-1_amd64.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.9-1_amd64.deb``
| Windows | [gf-3.9-bin-windows.zip gf-3.9-bin-windows.zip] | //GF+S// | ``unzip gf-3.9-bin-windows.zip``
%| MINGW | [gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz] | //GF+S+C// | ``tar -C / gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz``
%| ... | ... | ... | ...
Features: GF = GF shell and grammar compiler and the Resource Grammar Library,
@@ -44,17 +45,18 @@ variables, see Inari's notes on
%(which is started with ``C:\MinGW\msys\1.0\msys.bat``).
%It should work out of the box without any additional settings.
The ``.deb`` packages should work on Ubuntu 12.04, 14.04 and 16.04 and similar
The ``.deb`` packages should work on Ubuntu 16.04 and 17.04 and similar
Linux distributions.
The packages for Mac OS X should work on at least 10.9, 10.10 and 10.11 (Mavericks, Yosemite and El Capitan).
The packages for macOS (Mac OS X) should work on at
least 10.11 and 10.12 (El Capitan and Sierra).
(*) **Note** that for compatibility with OS X 10.11,
``gf-3.8.pkg`` will install the ``gf`` executable in ``/usr/local/bin``
instead of ``/usr/bin``, so make sure ``/usr/local/bin`` is in your ``$PATH``.
Also, if you still have an older version of GF installed in ``/usr/bin``,
remove it and/or make sure ``/usr/local/bin`` comes before ``/usr/bin``
in your ``$PATH`` so you don't accidentally run the old version.
%(*) **Note** that for compatibility with OS X 10.11 and newer,
%``gf-3.9.pkg`` will install the ``gf`` executable in ``/usr/local/bin``
%instead of ``/usr/bin``, so make sure ``/usr/local/bin`` is in your ``$PATH``.
%Also, if you still have an older version of GF installed in ``/usr/bin``,
%remove it and/or make sure ``/usr/local/bin`` comes before ``/usr/bin``
%in your ``$PATH`` so you don't accidentally run the old version.
The Mac OS and Linux ``.tar.gz`` packages are designed to be installed in
``/usr/local``.
@@ -62,7 +64,7 @@ You can install them in other locations, but then you need to set the
``GF_LIB_PATH`` environment variable:
```
export GF_LIB_PATH=/usr/local/share/gf-3.8/lib
export GF_LIB_PATH=/usr/local/share/gf-3.9/lib
```
where ``/usr/local`` should be replaced with the path to the location where you
@@ -84,7 +86,7 @@ circumstances the prodedure is fairly simple:
You can also download the full source package from here:
[``gf-3.8.tar.gz`` gf-3.8.tar.gz].
[``gf-3.9.tar.gz`` gf-3.9.tar.gz].
=== Notes ===
@@ -115,21 +117,21 @@ manually. Here is one way to do this:
**Note 2**.
The GF source code has been updated to compile with GHC 8.0.1. Using older
versions of GHC (7.10.3, 7.10.2, 7.8, 7.6) should work too.
The GF source code has been updated to compile with GHC 8.2.1. Using older
versions of GHC (e.g. 8.0.x and 7.10.3) should still work too.
=== Known problems ===
There seems to be a bug in some versions of Cabal that can cause
```
Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed
```
if the same version of GF is
already installed. If you encounter this, you can use ``ghc-pkg unregister gf``
to remove the installed version of GF and ``ghc-pkg list gf`` to verify that
it is gone.
%=== Known problems ===
%
%There seems to be a bug in some versions of Cabal that can cause
%
%```
% Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed
%```
%
%if the same version of GF is
%already installed. If you encounter this, you can use ``ghc-pkg unregister gf``
%to remove the installed version of GF and ``ghc-pkg list gf`` to verify that
%it is gone.
==Installing from the latest developer source code==
@@ -137,7 +139,7 @@ The first time:
%, assuming you already have the Haskell Platform and darcs
```
darcs get --lazy http://www.grammaticalframework.org/ GF
git clone https://github.com/GrammaticalFramework/GF.git
cd GF
cabal install
```
@@ -146,13 +148,13 @@ Subsequently:
```
cd GF
darcs pull -a
git pull
cabal install
```
Alternatively, you can get the code from the
[GF GitHub https://github.com/GrammaticalFramework/GF/] mirror, which is
updated nightly.
%Alternatively, you can get the code from the
%[GF GitHub https://github.com/GrammaticalFramework/GF/] mirror, which is
%updated nightly.
The above notes for installing from source apply also in these cases.
For more info on working with the GF source code, see the
@@ -160,6 +162,7 @@ For more info on working with the GF source code, see the
==Older releases==
- [GF 3.8 index-3.8.html] (June 2016)
- [GF 3.7.1 index-3.7.1.html] (October 2015)
- [GF 3.7 index-3.7.html] (June 2015)
- [GF 3.6 index-3.6.html] (June 2014)

73
download/release-3.9.t2t Normal file
View File

@@ -0,0 +1,73 @@
GF 3.9 Release Notes
August 2017
%!style:../css/notes.css
%!postproc(html): <TITLE> <meta charset="UTF-8"><meta name = "viewport" content = "width = device-width"> <TITLE>
%!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>
==Installation==
See the [download page http://www.grammaticalframework.org/download/index.html].
==What's new==
The [GF repository on GitHub https://github.com/GrammaticalFramework/GF/]
is now our master source repository, not just a read-only mirror.
Bug reports and feature requests can be submitted to the
[issue tracker https://github.com/GrammaticalFramework/GF/issues],
and we also accept pull requests.
Over 200 changes have been pushed to the source repository since
[the release of GF 3.8 release-3.8.html] in June 2016.
===GF compiler and run-time library===
====New features and notable changes====
- Support for language-specific depencency configurations (in addition to abstract syntax based ones); see ``help vd`` in the GF shell
- An experimental support for sentence lookup which makes it possible
to find the sentence from the grammar that matches best a set of keywords.
Right now it is usable only with controlled languages since it might be
very innefficient for some grammars.
- A new .NET binding for the GF runtime is available.
- The API in the Java binding is extended and it covers more from
the full functionality of the C runtime.
====Changes of interest to compiler developers====
- The compiler source code has been updated for compatibility with GHC 8.2.1.
===Resource Grammar Library===
- New languages:
- Icelandic
- Norwegian Nynorsk
- API now usable for incomplete languages via ``Missing`` modules:
implemented for Arabic and Latin.
- Punctuation with ``BIND`` and ``SOFT_BIND`` tokens for a number of languages
- Various fixes for several languages.
- Various fixes in the translation dictionaries.
===Apps and Cloud services===
- PGF service: support for language-specific depencency configurations in
``command=deptree``.
--------------------
[www.grammaticalframework.org http://www.grammaticalframework.org]

View File

@@ -22,7 +22,7 @@ abstract App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
--P ,Phrasebook
,Phrasebook
** {
flags
@@ -30,8 +30,8 @@ flags
heuristic_search_factor=0.80; -- doesn't seem to affect speed or quality much
fun
--P PhrasePhr : Phrase -> Phr ;
--P Phrase_Chunk : Phrase -> Chunk ;
PhrasePhr : Phrase -> Phr ;
Phrase_Chunk : Phrase -> Chunk ;
ComplV2 : V2 -> NP -> VP ; -- sees him

View File

@@ -22,7 +22,8 @@ concrete AppBul of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookBul - [open_Adv,closed_A,open_A]
** AppFunctor with (Syntax = SyntaxBul) ;

View File

@@ -23,5 +23,6 @@ concrete AppCat of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookCat - [open_Adv,closed_A,open_A,at_Prep,cheap_A,expensive_A,stateCopula]
** AppFunctor with (Syntax = SyntaxCat) ;

View File

@@ -22,6 +22,7 @@ concrete AppChi of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookChi - [open_Adv,closed_A,open_A,at_Prep,by_Prep]
** AppFunctor with (Syntax = SyntaxChi) ;

View File

@@ -22,6 +22,7 @@ concrete AppDut of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookDut - [open_Adv,closed_A,open_A]
** AppFunctor with (Syntax = SyntaxDut) ;

View File

@@ -22,7 +22,8 @@ concrete AppEng of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookEng - [open_Adv]
** AppFunctor with (Syntax = SyntaxEng) ;

View File

@@ -23,5 +23,7 @@ concrete AppEst of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookEst - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxEst) ;

View File

@@ -22,6 +22,8 @@ concrete AppFin of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookFin - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxFin) ;

View File

@@ -22,5 +22,7 @@ concrete AppFre of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookFre - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxFre) ;

View File

@@ -20,14 +20,19 @@ incomplete concrete AppFunctor of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
Phrasebook - [open_Adv]
** open Syntax in {
flags
literal=Symb ;
-- case_sensitive=off ;
lin
PhrasePhr p = {s = "+" ++ p.s} | p ;
Phrase_Chunk p = p ;
ComplV2 v np = mkVP v np ;
ComplV2V v np vp = mkVP v np vp ;

View File

@@ -22,6 +22,8 @@ concrete AppGer of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookGer - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxGer) ;

View File

@@ -22,6 +22,8 @@ concrete AppHin of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookHin - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxHin) ;

View File

@@ -23,5 +23,7 @@ concrete AppIta of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookIta - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxIta) ;

View File

@@ -22,6 +22,8 @@ concrete AppJpn of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookJpn - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxJpn) ;

View File

@@ -23,5 +23,7 @@ concrete AppRus of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookRus - [open_Adv,closed_A,open_A,at_Prep,cost_V]
** AppFunctor with (Syntax = SyntaxRus) ;

View File

@@ -24,5 +24,7 @@ concrete AppSpa of App =
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
,PhrasebookSpa - [open_Adv,closed_A,open_A,at_Prep,cheap_A,expensive_A,stateCopula]
** AppFunctor with (Syntax = SyntaxSpa) ;

View File

@@ -21,6 +21,7 @@ concrete AppSwe of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookSwe - [open_Adv,closed_A,open_A]
** AppFunctor with (Syntax = SyntaxSwe) ;

View File

@@ -22,7 +22,9 @@ concrete AppTha of App =
-- Construction
-- Extensions
PassVPSlash, PassAgentVPSlash -- not reachable anyway
]
],
PhrasebookTha - [open_Adv,closed_A,open_A,at_Prep]
** AppFunctor with (Syntax = SyntaxTha) ;

View File

@@ -34,7 +34,7 @@ App16.pgf: $(APP16)
# Without dependencies:
App11:
$(GFMKT) -name=App12 $(APP11) +RTS -K200M
$(GFMKT) -name=App11 $(APP11) +RTS -K200M
App12:
$(GFMKT) -name=App12 $(APP12) +RTS -K200M
App13:
@@ -43,6 +43,8 @@ App14:
$(GFMKT) -name=App14 $(APP14) +RTS -K200M
App15:
$(GFMKT) -name=App15 $(APP15) +RTS -K200M
App16:
$(GFMKT) -name=App16 $(APP16) +RTS -K200M
# App grammars for individual languages
AppEng.pgf:: ; $(GFMKT) -name=AppEng AppEng.gf

View File

@@ -1,7 +1,7 @@
compile = runghc Compile
forApp:
$(compile) -opt Bul Cat Chi Dut Eng Est Fin Fre Ger Hin Ita Jpn Spa Swe Tha
$(compile) -opt Bul Cat Chi Dut Eng Est Fin Fre Ger Hin Ita Jpn Rus Spa Swe Tha
make gfos
.PHONY: gfos

View File

@@ -1,8 +1,8 @@
concrete SentencesPes of Sentences = NumeralUrd ** SentencesI - [sing,NNumeral,ObjPlural,MCan,MKnow,MMust,V2Wait,VWait] with
concrete SentencesPes of Sentences = NumeralPes ** SentencesI - [sing,NNumeral,ObjPlural,MCan,MKnow,MMust,V2Wait,VWait] with
(Syntax = SyntaxPes),
(Symbolic = SymbolicPes),
(Lexicon = LexiconPes) **
{
lin ObjPlural k = mkNP k ;
};;
};

View File

@@ -1,5 +1,5 @@
name: gf
version: 3.8
version: 3.9
cabal-version: >= 1.10
build-type: Custom
@@ -9,9 +9,9 @@ category: Natural Language Processing, Compiler
synopsis: Grammatical Framework
description: GF, Grammatical Framework, is a programming language for multilingual grammar applications
homepage: http://www.grammaticalframework.org/
bug-reports: http://code.google.com/p/grammatical-framework/issues/list
bug-reports: https://github.com/GrammaticalFramework/GF/issues
maintainer: Thomas Hallgren
tested-with: GHC==7.6.3, GHC==7.8.3, GHC==7.10.2, GHC==8.0.1
tested-with: GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2
data-dir: src
data-files: tools/gf.el
@@ -42,10 +42,13 @@ data-files: tools/gf.el
www/translator/*.css
www/translator/*.js
source-repository head
type: darcs
location: http://www.grammaticalframework.org/
--source-repository head
-- type: darcs
-- location: http://www.grammaticalframework.org/
source-repository head
type: git
location: https://github.com/GrammaticalFramework/GF.git
flag interrupt
Description: Enable Ctrl+Break in the shell
@@ -96,7 +99,7 @@ Library
else
build-depends: binary, data-binary-ieee754
ghc-options: -fwarn-unused-imports
--ghc-options: -fwarn-unused-imports
--if impl(ghc>=7.8)
-- ghc-options: +RTS -A20M -RTS
ghc-prof-options: -fprof-auto
@@ -136,11 +139,11 @@ Library
if flag(c-runtime)
exposed-modules: PGF2
other-modules: PGF2.FFI PGF2.Expr
other-modules: PGF2.FFI PGF2.Expr PGF2.Type
GF.Interactive2 GF.Command.Commands2
hs-source-dirs: src/runtime/haskell-bind
build-tools: hsc2hs
extra-libraries: gu pgf
extra-libraries: pgf gu
c-sources: src/runtime/haskell-bind/utils.c
cc-options: -std=c99
@@ -309,8 +312,7 @@ Library
else
build-tools: happy, alex>=3
if impl(ghc>=7.10)
ghc-options: -fno-warn-tabs
ghc-options: -fno-warn-tabs
if os(windows)
build-depends: Win32
@@ -323,7 +325,8 @@ Executable gf
main-is: gf-main.hs
default-language: Haskell2010
build-depends: gf, base
ghc-options: -threaded -fwarn-unused-imports
ghc-options: -threaded
--ghc-options: -fwarn-unused-imports
if impl(ghc>=7.0)
ghc-options: -rtsopts -with-rtsopts=-I5

View File

@@ -39,14 +39,15 @@ function sitesearch() {
<li><A HREF="demos/index.html">Other Demos</A>
</ul>
<ul>
<li><A HREF="http://www.grammaticalframework.org/download/index.html">Download GF</A>
<li><A HREF="http://www.grammaticalframework.org/download/index.html"><b>Download GF</b></A>
<li><a href="eclipse/index.html">GF Eclipse Plugin</a>
<li><a href="doc/gf-editor-modes.html">GF Editor Modes</a>
</ul>
<ul>
<li><A HREF="http://groups.google.com/group/gf-dev">User Group</A>
<li><a href="http://code.google.com/p/grammatical-framework/issues/list">Bug Reports</a>
<li><a href="https://github.com/GrammaticalFramework/GF/issues">Bug Reports</a>
(<a href="http://code.google.com/p/grammatical-framework/issues/list">old</a>)
<li><a href="http://grammatical-framework.blogspot.com/">Blog</a>
</ul>
</div>
@@ -54,10 +55,11 @@ function sitesearch() {
<div class=links>
<h4>Learn GF</h4>
<ul>
<li><a href="https://www.youtube.com/watch?v=x1LFbDQhbso">Google Tech Talk</a>
<li><A HREF="doc/gf-quickstart.html">QuickStart</A>
<li><A HREF="doc/gf-reference.html">QuickRefCard</A>
<li><A HREF="doc/gf-shell-reference.html">GF Shell Reference</A>
<li><a href="http://school.grammaticalframework.org/2015/"><b>GF Summer School</b></a>.
<li><a href="http://school.grammaticalframework.org/2017/"><b>GF Summer School</b></a>
</ul>
<ul>
<li><A HREF="gf-book">The GF Book</A>
@@ -75,9 +77,12 @@ function sitesearch() {
<div class=links>
<h4>Develop GF</h4>
<ul>
<!--
<li><a href="http://ci.zjyto.net/job/GF/job/Build/"><img src="http://ci.zjyto.net/job/GF/job/Build/badge/icon" alt="GF build status"></a>
-->
<li><a href="doc/gf-developers.html">GF Developers Guide</a>
<li><A HREF="https://github.com/GrammaticalFramework/GF/">GitHub mirror</A>
<li><A HREF="https://github.com/GrammaticalFramework/GF/">GF on GitHub</A>
<li><A HREF="https://github.com/GrammaticalFramework/gf-contrib/">Contibutions GitHub</A>
<li><A HREF="http://code.google.com/p/grammatical-framework/wiki/SideBar?tm=6">Wiki</A>
<li><a href="/~hallgren/gf-experiment/browse/">Browse Source Code</a>
<li><A HREF="doc/gf-people.html">Authors</A>
@@ -86,6 +91,8 @@ function sitesearch() {
<ul>
<li><a href="http://hackage.haskell.org/package/gf-3.7.1/docs/PGF.html">PGF library API (Haskell)</a>
<li><a href="doc/python-api.html">PGF library API (Python)</a>
<li><a href="doc/java-api/index.html">PGF library API (Java)</a>
<li><a href="doc/dotNet-api/index.html">PGF library API (.NET)</a>
<li><a href="src/ui/android/README">GF on Android (new)</a>
<li><A HREF="/android/">GF on Android (old) </A>
</ul>
@@ -112,9 +119,24 @@ document.write('<div style="float: right; margin-top: 3ex;"> <form onsubmit="re
<div class=news2>
<table class=news>
<table class=news>
<tr><td>2016-08-11:<td><strong>GF 3.9 released!</strong>
<a href="download/release-3.9.html">Release notes</a>.
<tr><td>2017-06-29:<td>GF is moving to <a href="https://github.com/GrammaticalFramework/GF/">GitHub</a>!
<tr><td>2017-03-13:<td><strong>GF Summer School in Riga (Latvia), 14-25 August 2017</strong>
<a href="http://school.grammaticalframework.org/2017/">Summer
School web page</a>.
<tr><td>2016-09-07:<td><strong>Google Tech Talk on GF</strong> <a
href="https://www.youtube.com/watch?v=x1LFbDQhbso">on Youtube</a>.
<tr><td>2016-07-05:<td>GitHub mirror temporarily not updated, due to server migration.
<tr><td>2016-06-22:<td><strong>GF 3.8 released!</strong>
<a href="download/release-3.8.html">Release notes</a>.
<a href="download/release-3.8.html">Release notes</a>.
<tr><td>2015-06-21:<td><strong>Summer School in Rule-Based Machine
Translation in Alacant/Alicante (Spain), 11-21 July 2016</strong>
featuring GF, Apertium, Matxin, and TectoMT.
<a href="http://xixona.dlsi.ua.es/rbmt-summer-school/2016/">Summer
School web page</a>.
<tr><td>2016-06-14:<td>New resource grammar language: Nynorsk.
<tr><td>2015-10-02:<td><strong>GF 3.7.1 released!</strong>
<a href="download/release-3.7.1.html">Release notes</a>.
<tr><td>2015-06-25:<td><strong>GF 3.7 released!</strong>
@@ -296,7 +318,7 @@ Later projects using GF and involving third parties include, in chronological or
<p>
Here is a <a
href="http://videos.xrce.xerox.com/index.php/videos/index/618">talk
about GF at XRCE</a>,
about GF at XRCE</a>,
14 years later.
<P>

View File

@@ -34,6 +34,7 @@ exx: exx-script
gf -retain -s $(GF_alltenses)/TryGer.gfo <api-examples.gfs >api-examples-Ger.txt
gf -retain -s $(GF_alltenses)/TryGre.gfo <api-examples.gfs >api-examples-Gre.txt
gf -retain -s $(GF_alltenses)/TryHin.gfo <api-examples.gfs >api-examples-Hin.txt
gf -retain -s $(GF_alltenses)/TryIce.gfo <api-examples.gfs >api-examples-Ice.txt
gf -retain -s $(GF_alltenses)/TryIta.gfo <api-examples.gfs >api-examples-Ita.txt
gf -retain -s $(GF_alltenses)/TryJpn.gfo <api-examples.gfs >api-examples-Jpn.txt
gf -retain -s $(GF_alltenses)/TryLav.gfo <api-examples.gfs >api-examples-Lav.txt
@@ -41,6 +42,7 @@ exx: exx-script
gf -retain -s $(GF_alltenses)/TryMon.gfo <api-examples.gfs >api-examples-Mon.txt
gf -retain -s $(GF_alltenses)/TryNep.gfo <api-examples.gfs >api-examples-Nep.txt
gf -retain -s $(GF_alltenses)/TryNor.gfo <api-examples.gfs >api-examples-Nor.txt
gf -retain -s $(GF_alltenses)/TryNno.gfo <api-examples.gfs >api-examples-Nno.txt
gf -retain -s $(GF_alltenses)/TryPes.gfo <api-examples.gfs >api-examples-Pes.txt
gf -retain -s $(GF_alltenses)/TryPnb.gfo <api-examples.gfs >api-examples-Pnb.txt
gf -retain -s $(GF_alltenses)/TryPol.gfo <api-examples.gfs >api-examples-Pol.txt

View File

@@ -19,7 +19,7 @@ revealedLang = "Eng"
-- all languages shown
apiExxFiles = ["api-examples-" ++ lang ++ ".txt" | lang <- words
-- "Eng Chi"
"Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ita Jpn Lav Mlt Mon Nep Nor Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd"
"Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd"
]
main = do
@@ -45,6 +45,8 @@ main = do
append "%!postproc(html): '(SRC=\"categories.png\")' '\\1 USEMAP=\"#categories\"'"
append "%!postproc(html): '#LParadigms' '<a name=\"RParadigms\"></a>'"
append "%!postproc(tex): '#LParadigms' ''"
append "%!postproc(html): '#quicklinks' '<script src=\"quicklinks.js\"></script>'"
append "%!postproc(tex): '#quicklinks' ''"
delimit $ addToolTips cs
include "synopsis-intro.txt"
title "Categories"
@@ -95,6 +97,8 @@ main = do
space
append "%%toc"
space
append "#quicklinks"
space
let format = if isLatex then "tex" else "html"
system $ "txt2tags -t" ++ format ++ " " ++ " --toc " ++ synopsis
if isLatex then (system $ "pdflatex synopsis.tex") >> return () else return ()
@@ -252,6 +256,7 @@ paradigmFiles = [
("German", srcPath "/german/ParadigmsGer.gf"),
("Greek", srcPath "/greek/ParadigmsGre.gf"),
("Hindi", srcPath "/hindi/ParadigmsHin.gf"),
("Icelandic", srcPath "/icelandic/ParadigmsIce.gf"),
-- ("Interlingua", srcPath "/interlingua/ParadigmsIna.gf"),
("Italian", srcPath "/italian/ParadigmsIta.gf"),
("Japanese", srcPath "/japanese/ParadigmsJpn.gf"),
@@ -260,6 +265,7 @@ paradigmFiles = [
("Mongolian", srcPath "/mongolian/ParadigmsMon.gf"),
("Nepali", srcPath "/nepali/ParadigmsNep.gf"),
("Norwegian", srcPath "/norwegian/ParadigmsNor.gf"),
("Nynorsk", srcPath "/nynorsk/ParadigmsNno.gf"),
("Polish", srcPath "/polish/ParadigmsPol.gf"),
("Punjabi", srcPath "/punjabi/ParadigmsPnb.gf"),
("Romanian", srcPath "/romanian/ParadigmsRon.gf"),

109
lib/doc/quicklinks.js Normal file
View File

@@ -0,0 +1,109 @@
// Find an element with a certain tag containing a certain text.
function findElement(tagname,text) {
var els=document.body.getElementsByTagName(tagname)
for(var i=0;i<els.length;i++)
if(els[i].innerText==text) return els[i]
return null
}
function text(s) { return document.createTextNode(s); }
function appendChildren(n,ds) {
if(Array.isArray(ds)) for(var i in ds) n.appendChild(ds[i]);
else if(typeof ds=="string")
n.appendChild(text(ds))
else
n.appendChild(ds)
}
function node(tag,cls,ds) {
var n=document.createElement(tag)
if(cls) n.className=cls
if(ds) appendChildren(n,ds)
return n
}
function a(href,txt) {
var a=node("a","",txt)
a.href=href
return a
}
function tr(ds) { return node("tr","",ds) }
function th(d) { return node("th","",d) }
function td(d) { return node("td","",d) }
function forAllLinks(list,f) {
for(var i=0;i<list.length;i++) {
var c=list[i].firstElementChild
if(c && c.tagName=="A" && c.href) f(c)
}
}
/* -------------------------------------------------------------------------- */
// Extract links to the syntax rules
function listrules(ul) {
var rules=[]
if(ul.tagName!="UL") return []
forAllLinks(ul.children,function(c) {
rules.push({href:c.href,text:c.innerText.split(" -")[0],
full:c.innerText})
})
return rules
}
// Extract the links to the paradigm sections for all the languages
function listlangs(ul) {
var langs=[]
if(ul.tagName!="UL") return []
forAllLinks(ul.children,function(c) {
if(/^Paradigms for /.test(c.innerText))
langs.push({href:c.href,text:c.innerText.substr(14),
full:c.innerText})
})
return langs
}
function linklist(links) {
var d=node("td","quicklinks")
for(var i=0;i<links.length;i++) {
var l=a(links[i].href,links[i].text)
l.title=links[i].full
d.appendChild(l)
}
return d
}
function quicklinks() {
// Find the detailed table of contents
var h1toc=findElement("h1","Table of Contents")
var ultoc=h1toc.nextElementSibling
while(ultoc && ultoc.tagName!="UL") ultoc=ultoc.nextElementSibling
var lis=ultoc.children
var syntaxrules=[],langs=[]
// Find the Syntax Rules and Lexical Paradigms sections in the toc
for(var i=0;i<lis.length;i++) {
var li=lis[i],c=li.firstElementChild
if(c.tagName=="A") {
if(/^Syntax Rules /.test(c.innerText))
syntaxrules=listrules(c.nextElementSibling)
else if(c.innerText=="Lexical Paradigms")
langs=listlangs(c.nextElementSibling)
}
}
var table=node("table","quicklinks",
[tr([th("Syntax"),th("Morphology")]),
tr([linklist(syntaxrules),linklist(langs)])])
return node("div","quicklinks",
[text("Quick links"),
node("div","expand",table)])
}
document.body.appendChild(quicklinks())

View File

@@ -14,7 +14,7 @@ div.reveal:hover div.popup {
}
.popup dl { margin: 5px; }
tr:hover div.expand {
tr:hover div.expand, div.quicklinks:hover > div.expand {
display: block;
}
@@ -24,3 +24,28 @@ table { border-collapse: collapse; }
td, th { padding: 5px; }
th { background: #9df; }
td { background: white }
/* Quick links */
/* To prevent Quick links from overlapping page header: */
h1 { margin-right: 2.5em; }
div.quicklinks {
position: fixed;
top:0; right:0;
max-height: 97%;
overflow: scroll;
background-color: rgba(255,255,192,0.9);
font-family: sans-serif;
box-shadow: 4px 4px 12px rgba(0,0,0,0.33);
padding: 5px;
}
table.quicklinks th, td.quicklinks {
border: 1px solid black;
vertical-align: top;
font-size: 90%;
line-height: 130%;
}
div.quicklinks a { display: block; }

View File

@@ -9,7 +9,7 @@
<CENTER>
<H1>GF Resource Grammar Library Documentation and Publications</H1>
<FONT SIZE="4"><I>Aarne Ranta</I></FONT><BR>
<FONT SIZE="4">20131018</FONT>
<FONT SIZE="4">20170119</FONT>
</CENTER>
<P>
@@ -239,6 +239,16 @@ In The 3rd Workshop
on South and Southeast Asian NLP, COLING 2012. <I>Reprinted in Shafqat's thesis</I>
</UL>
<H3>Icelandic</H3>
<UL>
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/icelandic">http://www.grammaticalframework.org/lib/src/icelandic</A> (Bjarki Traustason)
<P></P>
<B>Publications</B>
<P></P>
Bjarki Traustason, MSc thesis, Chalmers
</UL>
<H3>Interlingua</H3>
<UL>
@@ -325,12 +335,18 @@ MSc thesis, Chalmers University of Technology,
<A HREF="http://publications.lib.chalmers.se/records/fulltext/161384.pdf">http://publications.lib.chalmers.se/records/fulltext/161384.pdf</A>
</UL>
<H3>Norwegian</H3>
<H3>Norwegian (bokmål)</H3>
<UL>
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/norwegian">http://www.grammaticalframework.org/lib/src/norwegian</A> <A HREF="http://www.grammaticalframework.org/lib/src/scandinavian">http://www.grammaticalframework.org/lib/src/scandinavian</A> (Aarne Ranta)
</UL>
<H3>Norwegian (nynorsk)</H3>
<UL>
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/nynorsk">http://www.grammaticalframework.org/lib/src/nynorsk</A> (Stian Rødven Eide) <A HREF="http://www.grammaticalframework.org/lib/src/scandinavian">http://www.grammaticalframework.org/lib/src/scandinavian</A> (Aarne Ranta)
</UL>
<H3>Persian</H3>
<UL>

View File

@@ -258,6 +258,15 @@ on South and Southeast Asian NLP, COLING 2012. //Reprinted in Shafqat's thesis//
===Icelandic===
- **Source**: http://www.grammaticalframework.org/lib/src/icelandic (Bjarki Traustason)
**Publications**
Bjarki Traustason, MSc thesis, Chalmers
===Interlingua===
- **Source**: http://www.grammaticalframework.org/lib/src/interlingua (Jean-Philippe Bernardy)
@@ -350,12 +359,18 @@ http://publications.lib.chalmers.se/records/fulltext/161384.pdf
===Norwegian===
===Norwegian (bokmål)===
- **Source**: http://www.grammaticalframework.org/lib/src/norwegian http://www.grammaticalframework.org/lib/src/scandinavian (Aarne Ranta)
%- **Publications**
===Norwegian (nynorsk)===
- **Source**: http://www.grammaticalframework.org/lib/src/nynorsk (Stian Rødven Eide) http://www.grammaticalframework.org/lib/src/scandinavian (Aarne Ranta)
%- **Publications**
===Persian===

View File

@@ -2,12 +2,13 @@
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf8">
<TITLE>The Status of the GF Resource Grammar Library</TITLE>
</HEAD><BODY BGCOLOR="white" TEXT="black">
<CENTER>
<H1>The Status of the GF Resource Grammar Library</H1>
<FONT SIZE="4"><I>Aarne Ranta</I></FONT><BR>
<FONT SIZE="4">20150313</FONT>
<FONT SIZE="4">20170119</FONT>
</CENTER>
<P>
@@ -332,6 +333,23 @@ are marked in the table
<TD>*SV,*KP,MH,AR,PK</TD>
</TR>
<TR>
<TD>Ice</TD>
<TD>Icelandic</TD>
<TD>+</TD>
<TD>-</TD>
<TD>++</TD>
<TD>+</TD>
<TD>+</TD>
<TD>+</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>+</TD>
<TD>*BT</TD>
</TR>
<TR>
<TD>Ina</TD>
<TD>Interlingua</TD>
<TD>+</TD>
@@ -393,7 +411,7 @@ are marked in the table
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>+</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
@@ -468,6 +486,23 @@ are marked in the table
<TD>*DS</TD>
</TR>
<TR>
<TD>Nno</TD>
<TD>Norwegian(n)</TD>
<TD>+</TD>
<TD>+</TD>
<TD>++</TD>
<TD>+</TD>
<TD>+</TD>
<TD>+</TD>
<TD>+</TD>
<TD>+</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>*SRE</TD>
</TR>
<TR>
<TD>Nor</TD>
<TD>Norwegian(b)</TD>
<TD>+</TD>
@@ -563,8 +598,8 @@ are marked in the table
<TD>+</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>-</TD>
<TD>+</TD>
<TD>+</TD>
<TD>-</TD>
<TD>+</TD>
<TD>JK,*NF</TD>
@@ -759,15 +794,16 @@ AB Ansu Berg,
AD Ali El Dada,
AR Aarne Ranta,
AS Adam Slaski,
BB Björn Bringert,
BB Björn Bringert,
BT Bjarki Traustason,
CK Chotiros Kairoje,
CP Chen Peng,
DD Dana Dannélls,
DD Dana Dannélls,
DS Dinesh Simk,
EA Elnaz Abolahrar,
EG Erzsébet Galgóczy
EG Erzsébet Galgóczy
FJ Femke Johansson,
HH Harald Hammarström,
HH Harald Hammarström,
HLa Herbert Lange,
HLe Hans Leiss,
GP Gabriele Paganelli,
@@ -799,8 +835,9 @@ RE Ramona Enache,
PP Peteris Paikens,
SC Server Cimen,
SM Sofy Moradi,
SRE Stian Rødven Eide,
SV Shafqat Virk,
TH Therese Söderberg,
TH Therese Söderberg,
WN Wanjiku Ng'ang'a,
ZL Zhuo Lin Qiqige
</P>

View File

@@ -2,7 +2,7 @@ The Status of the GF Resource Grammar Library
Aarne Ranta
%%date
%!Encoding:utf8
The following table gives the languages currently available in the
GF Resource Grammar Library.
@@ -33,20 +33,22 @@ are marked in the table
| Grc | Greek(anc) | - | - | - | - | - | - | - | - | - | - | - | + | *HLe
| Heb | Hebrew | + | - | - | - | - | - | - | - | - | - | - | + | *DD
| Hin | Hindi | + | + | ++ | + | + | + | + | - | - | + | + | + | *SV,*KP,MH,AR,PK
| Ice | Icelandic | + | - | ++ | + | + | + | - | - | - | - | - | + | *BT
| Ina | Interlingua | + | + | ++ | + | + | - | - | - | - | - | - | - | JB
| Ita | Italian | + | + | ++ | + | + | + | + | - | - | + | ++ | - | *AR,*RE,GP
| Jpn | Japanese | + | - | ++ | + | + | + | - | - | - | + | + | + | *LZ
| Lat | Latin | + | - | - | - | - | - | - | - | - | - | - | - | *AR,*HLa
| Lat | Latin | + | - | - | - | - | - | - | - | + | - | - | - | *AR,*HLa
| Lav | Latvian | + | - | ++ | + | + | + | - | - | - | - | + | + | *NG,*PP
| Mlt | Maltese | + | + | ++ | + | + | + | + | - | - | - | - | + | *JC
| Mon | Mongolian | + | - | ++ | + | + | + | - | - | + | - | - | + | *NE
| Nep | Nepali | + | + | ++ | + | + | - | - | - | - | - | - | + | *DS
| Nno | Norwegian(n) | + | + | ++ | + | + | + | + | + | - | - | - | - | *SRE
| Nor | Norwegian(b) | + | + | ++ | + | + | + | + | + | - | - | + | - | *AR
| Pes | Persian | + | - | + | + | + | + | - | - | - | - | + | + | *SV,*EA,SM
| Pnb | Punjabi | + | + | + | + | + | + | + | - | - | - | - | + | *SV,MH
| Pol | Polish | + | + | + | + | + | + | + | - | - | - | + | + | IN,*AS
| Ron | Romanian | + | + | ++ | + | + | + | + | - | - | - | + | + | *RE
| Rus | Russian | + | + | ++ | + | + | + | - | - | - | - | - | + | JK,*NF
| Rus | Russian | + | + | ++ | + | + | + | - | - | + | + | - | + | JK,*NF
| Snd | Sindhi | + | + | ++ | + | + | + | + | - | - | - | - | + | *SV,*JD
| Spa | Spanish | + | + | ++ | + | + | + | + | + | - | + | ++ | - | *AR,IA,TS,*IL
| Swa | Swahili | + | - | - | - | - | - | - | - | - | - | - | + | *WN,JM
@@ -93,15 +95,16 @@ AB Ansu Berg,
AD Ali El Dada,
AR Aarne Ranta,
AS Adam Slaski,
BB Björn Bringert,
BB Björn Bringert,
BT Bjarki Traustason,
CK Chotiros Kairoje,
CP Chen Peng,
DD Dana Dannélls,
DD Dana Dannélls,
DS Dinesh Simk,
EA Elnaz Abolahrar,
EG Erzsébet Galgóczy
EG Erzsébet Galgóczy
FJ Femke Johansson,
HH Harald Hammarström,
HH Harald Hammarström,
HLa Herbert Lange,
HLe Hans Leiss,
GP Gabriele Paganelli,
@@ -133,8 +136,9 @@ RE Ramona Enache,
PP Peteris Paikens,
SC Server Cimen,
SM Sofy Moradi,
SRE Stian Rødven Eide,
SV Shafqat Virk,
TH Therese Söderberg,
TH Therese Söderberg,
WN Wanjiku Ng'ang'a,
ZL Zhuo Lin Qiqige

View File

@@ -8,7 +8,7 @@
=Introduction=
The GF Resource Grammar Library is the standard library for Grammatical Framework.
It covers the morphology and basic syntax of currently 30 languages:
It covers the morphology and basic syntax of currently 32 languages:
Afrikaans,
Bulgarian,
Catalan,
@@ -22,13 +22,15 @@ French,
German,
Greek,
Hindi,
Icelandic,
Japanese,
Italian,
Latvian,
Maltese,
Mongolian,
Nepali,
Norwegian bokmål,
Norwegian (bokmål),
Norwegial (nynorsk),
Persian,
Polish,
Punjabi,
@@ -53,12 +55,12 @@ constructing trees in them.
- [Chapter 2 #toc5]: syntactic construction functions, with cross-links and
examples.
- [Chapter 3 #toc84]: morphological paradigms.
- [Chapter 4 #toc114]: additional libraries.
- [Chapter 5 #toc120]: how to "browse" the library by
- [Chapter 4 #toc116]: additional libraries.
- [Chapter 5 #toc122]: how to "browse" the library by
loading the grammars into the ``gf`` command editor.
- [Chapter 6 #toc121]: a brief example of how application grammars can
- [Chapter 6 #toc123]: a brief example of how application grammars can
use the resource modules.
- [Detailed table of contents #toc122].
- [Detailed table of contents #toc124].
Other relevant documents:

File diff suppressed because it is too large Load Diff

View File

@@ -84,6 +84,8 @@ SentAP amod acl
DetQuantOrd head nummod amod -- quite wrong; again for same reason as DetQuant function
DetCN det head
IDetCN det head
IDetQuant head empty
CountNP det head
PredetNP det head
PPartNP head amod -- only in core RGL
@@ -183,6 +185,7 @@ Det DET
Digits NUM
IAdv ADV
IDet DET
IQuant DET
IP PRON
Interj INTJ
N NOUN

View File

@@ -149,6 +149,8 @@ TRANSLATE10=TranslateEng.pgf TranslateBul.pgf TranslateChi.pgf TranslateGer.pgf
TRANSLATE11=$(TRANSLATE10) TranslateDut.pgf
TRANSLATE15=$(TRANSLATE10) TranslateDut.pgf TranslateCat.pgf TranslateEst.pgf TranslateTha.pgf TranslateJpn.pgf
# Without dependencies:
Translate10:
$(GFMKT) -name=Translate10 $(TRANSLATE10) +RTS -K32M
@@ -173,6 +175,9 @@ Translate8:
Translate8.pgf: $(TRANSLATE8)
$(GFMKT) -name=Translate8 $(TRANSLATE8) +RTS -K32M
Translate15.pgf: $(TRANSLATE15)
$(GFMKT) -name=Translate15 $(TRANSLATE15) +RTS -K32M
# Translate grammars for individual languages
TranslateEng.pgf:: ; $(GFMKT) -name=TranslateEng translator/TranslateEng.gf
TranslateBul.pgf:: ; $(GFMKT) -name=TranslateBul translator/TranslateBul.gf
@@ -185,6 +190,10 @@ TranslateFre.pgf:: ; $(GFMKT) -name=TranslateFre translator/TranslateFre.gf +RTS
TranslateSwe.pgf:: ; $(GFMKT) -name=TranslateSwe translator/TranslateSwe.gf
TranslateIta.pgf:: ; $(GFMKT) -name=TranslateIta translator/TranslateIta.gf +RTS -K64M
TranslateSpa.pgf:: ; $(GFMKT) -name=TranslateSpa translator/TranslateSpa.gf +RTS -K64M
TranslateCat.pgf:: ; $(GFMKT) -name=TranslateCat translator/TranslateCat.gf +RTS -K64M
TranslateEst.pgf:: ; $(GFMKT) -name=TranslateEst translator/TranslateEst.gf +RTS -K64M
TranslateTha.pgf:: ; $(GFMKT) -name=TranslateTha translator/TranslateTha.gf +RTS -K64M
TranslateJpn.pgf:: ; $(GFMKT) -name=TranslateJpn translator/TranslateJpn.gf +RTS -K64M
# Selected language pairs:
TranslateEngFin: ; $(GFMKT) -name=TranslateEngFin TranslateEng.pgf TranslateFin.pgf

View File

@@ -17,6 +17,10 @@ flags coding=utf8 ;
fun
hungry_VP : VP ; -- x is hungry / x a faim (Fre)
thirsty_VP : VP ; -- x is thirsty / x a soif (Fre)
tired_VP : VP ; -- x is tired / x estoy cansado (Spa)
scared_VP : VP ; -- x is scared
ill_VP : VP ; -- x is ill
ready_VP : VP ; -- x is ready
has_age_VP : Card -> VP ; -- x is y years old / x a y ans (Fre)
have_name_Cl : NP -> NP -> Cl ; -- x's name is y / x s'appelle y (Fre)

View File

@@ -29,7 +29,7 @@ lin
SymbS sy = {s = \\_ => sy.s} ;
SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ;
SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat

View File

@@ -0,0 +1,8 @@
--# -path=.:alltenses:prelude
resource CombinatorsIce = Combinators - [ appCN, appCNc ] with
(Cat = CatIce),
(Structural = StructuralIce),
(Noun = NounIce),
(Constructors = ConstructorsIce) **
{}

View File

@@ -0,0 +1,8 @@
--# -path=.:alltenses:prelude
resource CombinatorsLat = Combinators - [ appCN, appCNc ] with
(Cat = CatLat),
(Structural = StructuralLat),
(Noun = NounLat),
(Constructors = ConstructorsLat) **
{}

View File

@@ -1,3 +1,4 @@
--# -path=.:alltenses:prelude
--# -path=.:alltenses:prelude:../arabic
resource ConstructorsAra = Constructors with (Grammar = GrammarAra) ;
resource ConstructorsAra = Constructors with (Grammar = GrammarAra) **
open MissingAra in {}

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude
resource ConstructorsIce = Constructors with (Grammar = GrammarIce) ;

View File

@@ -0,0 +1,4 @@
--# -path=.:alltenses:prelude:../latin
resource ConstructorsLat = Constructors with (Grammar = GrammarLat) **
open MissingLat in {}

View File

@@ -0,0 +1,5 @@
--# -path=.:../icelandic:../common:../abstract:../prelude
resource SymbolicIce = Symbolic with
(Symbol = SymbolIce),
(Grammar = GrammarIce) ;

View File

@@ -0,0 +1,6 @@
--# -path=.:../japanese:../common:../abstract:../prelude
resource SymbolicJpn = Symbolic with
(Symbol = SymbolJpn),
(Grammar = GrammarJpn) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:../icelandic:../common:../abstract:../prelude
resource SymbolicLat = Symbolic with
(Symbol = SymbolLat),
(Grammar = GrammarLat) ;

5
lib/src/api/SyntaxIce.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude
instance SyntaxIce of Syntax =
ConstructorsIce, CatIce, StructuralIce, CombinatorsIce ;

5
lib/src/api/SyntaxLat.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude
instance SyntaxLat of Syntax =
ConstructorsLat, CatLat, StructuralLat, CombinatorsLat ;

6
lib/src/api/TryAra.gf Normal file
View File

@@ -0,0 +1,6 @@
--# -path=.:../arabic:../common:../abstract:../prelude
resource TryAra = SyntaxAra, LexiconAra, ParadigmsAra - [mkAdN, mkAdv,mkOrd,mkQuant] **
open (P = ParadigmsAra) in {
}

3
lib/src/api/TryIce.gf Normal file
View File

@@ -0,0 +1,3 @@
--# -path=.:../icelandic:../common:../abstract:../prelude
resource TryIce = SyntaxIce, LexiconIce, ParadigmsIce - [mkAdv,mkAdN,mkOrd] ;

3
lib/src/api/TryLat.gf Normal file
View File

@@ -0,0 +1,3 @@
--# -path=.:../latin:../common:../abstract:../prelude
resource TryLat = SyntaxLat, LexiconLat, ParadigmsLat - [mkAdv,mkAdN,mkOrd] ;

View File

@@ -0,0 +1,102 @@
resource MissingAra = open GrammarAra, Prelude in {
-- temporary definitions to enable the compilation of RGL API
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
oper AdjOrd : Ord -> AP = notYet "AdjOrd" ;
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
oper ApposCN : CN -> NP -> CN = notYet "ApposCN" ;
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
oper BaseAdv : Adv -> Adv -> ListAdv = notYet "BaseAdv" ;
oper BaseNP : NP -> NP -> ListNP = notYet "BaseNP" ;
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
oper BaseS : S -> S -> ListS = notYet "BaseS" ;
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
oper CompCN : CN -> Comp = notYet "CompCN" ;
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
oper CompIP : IP -> IComp = notYet "CompIP" ;
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
oper ComplA2 : A2 -> NP -> AP = notYet "ComplA2" ;
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ;
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
oper ConjNP : Conj -> ListNP -> NP = notYet "ConjNP" ;
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
oper ConjS : Conj -> ListS -> S = notYet "ConjS" ;
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
oper ConsAdv : Adv -> ListAdv -> ListAdv = notYet "ConsAdv" ;
oper ConsNP : NP -> ListNP -> ListNP = notYet "ConsNP" ;
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
oper ConsS : S -> ListS -> ListS = notYet "ConsS" ;
oper DetNP : Det -> NP = notYet "DetNP" ;
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
oper EmbedS : S -> SC = notYet "EmbedS" ;
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
oper IdRP : RP = notYet "IdRP" ;
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
oper PConjConj : Conj -> PConj = notYet "PConjConj" ;
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
oper PassV2 : V2 -> VP = notYet "PassV2" ;
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
oper RelCl : Cl -> RCl = notYet "RelCl" ;
oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
oper RelVP : RP -> VP -> RCl = notYet "RelVP" ;
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
oper UseA2 : A2 -> AP = notYet "UseA2" ;
oper UseComparA : A -> AP = notYet "UseComparA" ;
oper UseN2 : N2 -> CN = notYet "UseN2" ;
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
oper UttAP : AP -> Utt = notYet "UttAP" ;
oper UttCN : CN -> Utt = notYet "UttCN" ;
oper UttCard : Card -> Utt = notYet "UttCard" ;
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
oper UttVP : VP -> Utt = notYet "UttVP" ;
oper VocNP : NP -> Voc = notYet "VocNP" ;
oper it_Pron : Pron = notYet "it_Pron" ;
oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ;
oper which_IQuant : IQuant = notYet "which_IQuant" ;
}

View File

@@ -14,6 +14,11 @@ lincat
lin
hungry_VP = mkVP (mkA079 "гладен") ;
thirsty_VP = mkVP (mkA079 "жаден") ;
tired_VP = mkVP (mkA076 "уморен") ;
scared_VP = mkVP (mkA076 "уплашен") ;
ill_VP = mkVP (mkA079 "болен") ;
ready_VP = mkVP (mkA076 "готов") ;
has_age_VP card = mkVP (SyntaxBul.mkAdv (mkPrep "на" R.Acc) (mkNP <lin Card card : Card> (mkN041 "година"))) ;
have_name_Cl x name = mkCl <lin NP x : NP> (dirV2 (medialV (actionV (mkV186 "казвам") (mkV156 "кажа")) R.Acc)) <lin NP name : NP> ;
how_old_QCl p = mkQCl (MorphoFunsBul.mkIAdv "на колко") (mkCl <lin NP p : NP> (mkNP a_Quant plNum (mkN041 "година"))) ;

View File

@@ -1,5 +1,5 @@
--# -coding=cp1251
concrete TextBul of Text = CatBul ** {
concrete TextBul of Text = CatBul ** open Prelude in {
flags coding=cp1251 ;
@@ -7,8 +7,8 @@ concrete TextBul of Text = CatBul ** {
lin
TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ;
TQuestMark x xs = {s = x.s ++ "?" ++ xs.s} ;
TExclMark x xs = {s = x.s ++ "!" ++ xs.s} ;
TFullStop x xs = {s = x.s ++ SOFT_BIND ++ "." ++ xs.s} ;
TQuestMark x xs = {s = x.s ++ SOFT_BIND ++ "?" ++ xs.s} ;
TExclMark x xs = {s = x.s ++ SOFT_BIND ++ "!" ++ xs.s} ;
}

View File

@@ -6,6 +6,6 @@ concrete CompatibilityCat of Compatibility = CatCat ** open Prelude, CommonRoman
lin
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ; ---
OrdInt n = {s = \\_ => n.s ++ SOFT_BIND ++ "."} ; ---
}

View File

@@ -1,7 +1,7 @@
--# -path=alltenses:.:../abstract
concrete ConstructionCat of Construction = CatCat **
open SyntaxCat, SymbolicCat, ParadigmsCat,
open SyntaxCat, SymbolicCat, ParadigmsCat, BeschCat,
(L = LexiconCat), (E = ExtraCat), (I = IrregCat), (R = ResCat), (C = CommonRomance),
Prelude in {
flags coding=utf8 ;
@@ -10,6 +10,10 @@ flags coding=utf8 ;
lin
hungry_VP = E.ComplCN have_V2 (mkCN (mkN "gana" feminine)) ; -- "fam" (val)
thirsty_VP = E.ComplCN have_V2 (mkCN (mkN "set" feminine)) ;
tired_VP = mkVP stateCopula (mkAP (mkA "cansat")) ;
scared_VP = E.ComplCN have_V2 (mkCN (mkN "por" feminine)) ;
ill_VP = mkVP stateCopula (mkAP (mkA "malalt")) ;
ready_VP = mkVP stateCopula (mkAP (mkA "preparat")) ;
has_age_VP card = mkVP have_V2 (mkNP <lin Card card : Card> L.year_N) ;
@@ -55,6 +59,7 @@ lincat
Year = NP ;
oper
noPrep : Prep = mkPrep [] ;
stateCopula = mkVA (mkV (estar_54 "estar")) ;
lin
weekdayPunctualAdv w = lin Adv {s = w.s ! C.Sg} ; -- lundi

View File

@@ -8,6 +8,11 @@ flags coding=utf8 ;
lin
hungry_VP = mkVP (mkV "饿") ;
thirsty_VP = mkVP (mkA "渴") ;
tired_VP = mkVP (mkV "累了") ;
scared_VP = mkVP (mkA "惊慌") ;
ill_VP = mkVP (mkV "生病了") ;
ready_VP = mkVP L.ready_A ;
has_age_VP card = mkVP (lin AdV card) (mkVP (mkV "岁")) ;
have_name_Cl x y = mkCl (lin NP x) (mkV2 (mkV "叫")) (lin NP y) ;

View File

@@ -67,7 +67,7 @@ concrete NounChi of Noun = CatChi ** open ResChi, Prelude in {
OrdNumeralSuperl n a = {s = ordinal_s ++ n.s ++ superlative_s ++ a.s} ; ---- to check AR 24/8/2014
DefArt = mkQuant [] [] DTPoss ; -- use that_Quant if you want the_s
IndefArt = mkQuant yi_s [] DTPoss ; -- (DTFull Sg) ; -- empty in the plural
IndefArt = mkQuant yi_s [] DTNum ; -- (DTFull Sg) ; -- empty in the plural
MassNP cn = cn ;

View File

@@ -41,16 +41,5 @@ lin
perfect_neg_Chunk = ss "no ha" ;
past_perfect_Chunk = ss "havia" ;
past_perfect_neg_Chunk = ss "no havia" ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
}

View File

@@ -1,5 +1,5 @@
concrete ChunkFre of Chunk = CatFre, ExtensionsFre [VPS,VPI] **
ChunkFunctor - [AP_Chunk, SSlash_Chunk]
ChunkFunctor - [AP_Chunk, SSlash_Chunk, quote_Chunk]
with (Syntax = SyntaxFre), (Extensions = ExtensionsFre) **
open
SyntaxFre, (E = ExtensionsFre), Prelude,
@@ -10,6 +10,11 @@ lin
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
quote_Chunk = variants { ss (SOFT_BIND ++ "\"") ;
ss ("\"" ++ SOFT_BIND) ;
ss ("«" ++ SOFT_BIND) ;
ss (SOFT_BIND ++ "»") } ;
lin
NP_Acc_Chunk np = ss (np.s ! Acc).ton ;
NP_Gen_Chunk np = ss (np.s ! genitive).comp ;
@@ -42,15 +47,4 @@ lin
past_perfect_Chunk = ss "avait" ;
past_perfect_neg_Chunk = ss "n'avait pas" ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
}

View File

@@ -67,18 +67,19 @@ lin
Symb_Chunk s = lin Utt s ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
fullstop_Chunk = sbSS "." ;
exclmark_Chunk = sbSS "!" ;
questmark_Chunk = sbSS "?" ;
comma_Chunk = sbSS "," ;
colon_Chunk = sbSS ":" ;
semicolon_Chunk = sbSS ";" ;
quote_Chunk = variants {sbSS "\"" ; ss ("\"" ++ SOFT_BIND) } ;
lpar_Chunk = ss ("(" ++ SOFT_BIND) ;
rpar_Chunk = sbSS ")" ;
dash_Chunk = sbSS "-" ;
oper
emptyNP : NP = Syntax.mkNP (P.mkPN []) ;
sbSS : Str -> SS = \s -> ss (SOFT_BIND ++ s) ;
}

View File

@@ -42,15 +42,4 @@ oper
past_perfect_Chunk = ss "aveva" ;
past_perfect_neg_Chunk = ss "non aveva" ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
}

View File

@@ -40,16 +40,5 @@ lin
perfect_neg_Chunk = ss "no ha" ;
past_perfect_Chunk = ss "había" ;
past_perfect_neg_Chunk = ss "no había" ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;
questmark_Chunk = ss "?" ;
comma_Chunk = ss "," ;
colon_Chunk = ss ":" ;
semicolon_Chunk = ss ";" ;
quote_Chunk = ss "\"" ;
lpar_Chunk = ss "(" ;
rpar_Chunk = ss ")" ;
dash_Chunk = ss "-" ;
}

View File

@@ -1,11 +1,11 @@
concrete TextX of Text = CommonX ** {
concrete TextX of Text = CommonX ** open Prelude in {
-- This will work for almost all languages except Spanish.
lin
TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ;
TQuestMark x xs = {s = x.s ++ "?" ++ xs.s} ;
TExclMark x xs = {s = x.s ++ "!" ++ xs.s} ;
TFullStop x xs = {s = x.s ++ SOFT_BIND ++ "." ++ xs.s} ;
TQuestMark x xs = {s = x.s ++ SOFT_BIND ++ "?" ++ xs.s} ;
TExclMark x xs = {s = x.s ++ SOFT_BIND ++ "!" ++ xs.s} ;
}

View File

@@ -6,7 +6,7 @@ src:
runghc MkMini.hs
compdemo:
$(compile) Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ita Jpn Lav Mlt Mon Nep Nor Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd
$(compile) Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd
linkdemo:
$(compile) -link Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ita Jpn Lav Mlt Mon Nep Nor Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd
$(compile) -link Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd

View File

@@ -2,9 +2,10 @@ src = "Eng"
langs = [
"Afr","Bul","Cat","Chi","Dan","Dut",
"Est","Fin","Fre","Ger","Gre","Hin",
"Ita","Jpn","Lav","Mlt","Mon","Nep",
"Nor","Pes","Pol","Pnb","Ron","Rus",
"Snd","Spa","Swe","Tha","Urd"
"Ice","Ita","Jpn","Lav","Mlt","Mon",
"Nep","Nor","Nno","Pes","Pol","Pnb",
"Ron","Rus","Snd","Spa","Swe","Tha",
"Urd"
]
file lng = "ResourceDemo" ++ lng ++ ".gf"

View File

@@ -8,6 +8,11 @@ concrete ConstructionDut of Construction = CatDut **
lin
hungry_VP = mkVP have_V2 (mkNP (mkN "honger")) ;
thirsty_VP = mkVP have_V2 (mkNP (mkN "dorst")) ;
tired_VP = mkVP (mkA "moe") ;
scared_VP = mkVP (mkA "bang") ;
ill_VP = mkVP (mkA "ziek") ;
ready_VP = mkVP (mkA "klaar") ;
has_age_VP card = mkVP (mkNP <card : Card> L.year_N) ;
have_name_Cl x y = mkCl (lin NP x) (mkV2 I.heten_V) (lin NP y) ;

View File

@@ -194,7 +194,7 @@ lake_N = mkN "meer" neuter ;
lamp_N = mkN "lamp" utrum ;
language_N = mkN "taal" utrum ;
laugh_V = lachen_V ;
leaf_N = mkN "blad" neuter ;
leaf_N = mkN "blad" "bladeren" neuter ;
learn_V2 = mkV2 "leren" ;
leather_N = mkN "leer" neuter ;
leave_V2 = mkV2 (mkV "verlaten" "verliet" "verlieten" "verlaten") ;

View File

@@ -217,6 +217,7 @@ param
in
case lop of {
#vowel + #consonant => loop ;
_+ #consonant + #vowel + #consonant => loop ;
_+ ("bb" | "dd" | "ff" | "gg" | "kk" | "ll" | "mm" | "nn" | "pp" |
"rr" | "ss" | "tt") => zeg ;

View File

@@ -29,7 +29,7 @@ lin
SymbS sy = {s = \\_ => sy.s} ;
SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ;
SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat

View File

@@ -7,6 +7,11 @@ concrete ConstructionEng of Construction = CatEng **
lin
hungry_VP = mkVP (mkA "hungry") ;
thirsty_VP = mkVP (mkA "thirsty") ;
tired_VP = mkVP (mkA "tired") ;
scared_VP = mkVP (mkA "scared") ;
ill_VP = mkVP (mkA "ill") ;
ready_VP = mkVP (mkA "ready") ;
has_age_VP card = mkVP (mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> L.year_N))) L.old_A) ;
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;

View File

@@ -0,0 +1,11 @@
* {"not"} PART neg head
* {"has","had","have","will","would","do","does","did"} AUX aux head
CompAP {"is","are","am","was","been","be"} VERB cop head
CompCN {"is","are","am","was","been","be"} VERB cop head
CompAP {"is","are","am","was","been","be"} VERB cop head
CompAdv {"is","are","am","was","been","be"} VERB cop head
UseComp {"is","are","am","was","been","be"} VERB cop head
CompCN {"a","an"} DET det head
ComplVV {"to"} PART mark xcomp

View File

@@ -549,11 +549,11 @@ mkInterj : Str -> Interj
_ => regV s
} ;
prepV2 v p = lin V2 {s = v.s ; p = v.p ; s1 = v.s1 ; c2 = p.s ; isRefl = v.isRefl} ;
prepV2 v p = lin V2 {s = v.s ; p = v.p ; c2 = p.s ; isRefl = v.isRefl} ;
dirV2 v = prepV2 v noPrep ;
prepPrepV3 v p q =
lin V3 {s = v.s ; p = v.p ; s1 = v.s1 ; c2 = p.s ; c3 = q.s ; isRefl = v.isRefl} ;
lin V3 {s = v.s ; p = v.p ; c2 = p.s ; c3 = q.s ; isRefl = v.isRefl} ;
dirV3 v p = prepPrepV3 v noPrep p ;
dirdirV3 v = dirV3 v noPrep ;

View File

@@ -7,6 +7,11 @@ flags coding=utf8 ;
lin
hungry_VP = mkVP have_V2 (lin NP (mkNP (mkPN "kõht tühi"))) ;
thirsty_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsEst.mkN "janu"))) ;
tired_VP = mkVP (ParadigmsEst.mkA "väsinud") ;
scared_VP = mkVP (caseV nominative (mkV "kartma")) ;
ill_VP = mkVP (mkA "haige") ;
ready_VP = mkVP (ParadigmsEst.mkA "valmis") ;
has_age_VP card =
let n_years_AdA : AdA = lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> L.year_N)))
in mkVP (mkAP n_years_AdA L.old_A) ;

View File

@@ -130,7 +130,7 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
acn = DetCN (DetQuant IndefArt NumSg) cn
in {
s = table {
NPCase Nom | NPAcc => acn.s ! NPCase Part ;
NPCase Nom | NPAcc => acn.s ! NPCase ResEst.Part ;
c => acn.s ! c
} ;
a = acn.a ;

View File

@@ -27,7 +27,7 @@ lin
SymbS sy = sy ;
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ;
SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat

View File

@@ -6,10 +6,10 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, StemFin, Prelude in
lin
PositA a = {
s = \\_ => (snoun2nounSep {s = \\f => a.s ! Posit ! sAN f ; h = a.h}).s
s = \\_ => sAdjFull2nforms Posit a ;
} ;
ComparA a np =
let acomp = (snoun2nounSep {s = \\f => a.s ! Compar ! sAN f ; h = a.h}).s in {
let acomp = sAdjFull2nforms Compar a in {
s = \\isMod,af => case isMod of {
True => np.s ! NPCase Part ++ acomp ! af ; -- minua isompi
_ => acomp ! af ++ "kuin" ++ np.s ! NPSep -- isompi kuin minä
@@ -19,7 +19,7 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, StemFin, Prelude in
s = \\m,af => ad.s ++ ap.s ! m ! af ++ ad.p ++ np.s ! NPSep
} ;
UseComparA a = {
s = \\_ => (snoun2nounSep {s = \\f => a.s ! Compar ! sAN f ; h = a.h}).s
s = \\_ => sAdjFull2nforms Compar a
} ;
-- $SuperlA$ belongs to determiner syntax in $Noun$.
@@ -30,13 +30,13 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, StemFin, Prelude in
ComplA2 a np = {
s = \\isMod,af =>
preOrPost isMod (appCompl True Pos a.c2 np) ((snoun2nounSep {s = \\f => a.s ! Posit ! sAN f ; h = a.h}).s ! af)
preOrPost isMod (appCompl True Pos a.c2 np) (sAdjFull2nforms Posit a ! af)
} ;
ReflA2 a = {
s = \\isMod,af =>
preOrPost isMod
(appCompl True Pos a.c2 (reflPron (agrP3 Sg))) ((snoun2nounSep {s = \\f => a.s ! Posit ! sAN f ; h = a.h}).s ! af)
(appCompl True Pos a.c2 (reflPron (agrP3 Sg))) (sAdjFull2nforms Posit a ! af)
} ;
SentAP ap sc = {
@@ -52,7 +52,7 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, StemFin, Prelude in
} ;
UseA2 a = {
s = \\_ => (snoun2nounSep {s = \\f => a.s ! Posit ! sAN f ; h = a.h}).s
s = \\_ => sAdjFull2nforms Posit a
} ;
}

View File

@@ -6,6 +6,6 @@ concrete CompatibilityFin of Compatibility = CatFin ** open Prelude, ResFin in {
lin
NumInt n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
OrdInt n = {s = \\_ => n.s ++ "."} ;
OrdInt n = {s = \\_ => n.s ++ SOFT_BIND ++ "."} ;
}

View File

@@ -7,6 +7,11 @@ flags coding=utf8 ;
lin
hungry_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsFin.mkN "nälkä"))) ;
thirsty_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsFin.mkN "jano"))) ;
tired_VP = mkVP (caseV partitive (mkV "väsyttää")) ;
scared_VP = mkVP (caseV partitive (mkV "pelottaa")) ;
ill_VP = mkVP (mkA "sairas") ;
ready_VP = mkVP (ParadigmsFin.mkA "valmis") ;
has_age_VP card = mkVP (mkAP (lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> L.year_N)))) L.old_A) ;
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;

View File

@@ -65,13 +65,19 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
MkVPS t p vp0 = let vp = vp2old_vp vp0 in
{ -- Temp -> Pol -> VP -> VPS ;
s = \\a => let vps = vp.s ! VIFin t.t ! t.a ! p.p ! a
in
t.s ++ p.s ++
vps.fin ++ vps.inf ++
vp.s2 ! True ! p.p ! a ++
vp.adv ! p.p ++
vp.ext ;
s = \\a =>
let
agrfin = case vp.sc of {
SCNom => <a,True> ;
_ => <agrP3 Sg,False> -- minun täytyy, minulla on
} ;
vps = vp.s ! VIFin t.t ! t.a ! p.p ! agrfin.p1
in
t.s ++ p.s ++
vps.fin ++ vps.inf ++
vp.s2 ! agrfin.p2 ! p.p ! a ++
vp.adv ! p.p ++
vp.ext ;
sc = vp.sc ;
h = vp.h
} ;
@@ -137,6 +143,18 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
a = acn.a ;
isPron = False ; isNeg = False
} ;
PartPlCN cn =
let
acn = DetCN (DetQuant IndefArt NumPl) cn
in {
s = table {
NPCase Nom | NPAcc => acn.s ! NPCase ResFin.Part ;
c => acn.s ! c
} ;
a = acn.a ;
isPron = False ; isNeg = False
} ;
vai_Conj = {s1 = [] ; s2 = "vai" ; n = Sg} ;

View File

@@ -23,7 +23,8 @@ abstract ExtraFinAbs = Extra [
-- i_implicPron : Pron ; -- (minä), minut, ...
whatPart_IP : IP ;
PartCN : CN -> NP ; -- olutta
PartCN : CN -> NP ; -- olutta
PartPlCN : CN -> NP ; -- jauhoja
vai_Conj : Conj ; -- minä vai sinä? ("or" in question)

View File

@@ -151,7 +151,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
n = num.n
} ;
OrdSuperl a = snoun2nounSep {s = \\nc => a.s ! Superl ! sAN nc ; h = a.h} ;
OrdSuperl a = {s = sAdjFull2nforms Superl a ; h = a.h} ;
OrdNumeralSuperl n a = -- kolmanneksi suurin
{s = \\f => n.s ! NOrd (NCase Sg Transl) ++ (snoun2nounSep {s = \\nc => a.s ! Superl ! sAN nc ; h = a.h}).s ! f} ;

View File

@@ -387,7 +387,7 @@ mkVS = overload {
infFirst = Inf1 ; infElat = Inf3Elat ; infIllat = Inf3Illat ; infIness = Inf3Iness ; infPresPart = InfPresPart ; infPresPartAgr = InfPresPartAgr ;
prePrep : Case -> Str -> Prep =
\c,p -> lin Prep {c = NPCase c ; s = <p, [],\\_ => []>} ; -- no possessive suffix
\c,p -> lin Prep {c = NPCase c ; s = <tagFeature (tagPOS "ADP" p) "AdvType" "Pre", [],\\_ => []>} ; -- no possessive suffix
postPrep : Case -> Str -> Prep =
\c,p ->
@@ -397,9 +397,10 @@ mkVS = overload {
Gen => \\a => p ++ possSuffixGen h a ;
_ => \\a => p
} ;
pt = tagFeature (tagPOS "ADP" p) "AdvType" "Post" ;
in case p of {
mukaa + "n" => lin Prep {c = NPCase c ; s = <[],p, a2p>} ;
_ => lin Prep {c = NPCase c ; s = <[],p, a2p>}
mukaa + "n" => lin Prep {c = NPCase c ; s = <[],pt, a2p>} ; ---- p --> mukaa
_ => lin Prep {c = NPCase c ; s = <[],pt, a2p>}
} ;
postGenPrep = postPrep genitive ;
@@ -766,8 +767,8 @@ mkVS = overload {
dirV2 v = mk2V2 v accPrep ;
mkAdv = overload {
mkAdv : Str -> Adv = \s -> {s = s ; lock_Adv = <>} ;
mkAdv : AdvK -> Adv = \s -> {s = s.s ; lock_Adv = <>} ;
mkAdv : Str -> Adv = \s -> {s = tagPOS "ADV" s ; lock_Adv = <>} ;
mkAdv : AdvK -> Adv = \s -> {s = tagPOS "ADV" s.s ; lock_Adv = <>} ;
} ;
mkV2 = overload {

View File

@@ -4,6 +4,12 @@ resource StemFin = open MorphoFin, Prelude in {
flags coding = utf8 ;
oper
-- other classes not treated below are POS tagged when the grammar is used with Omorfi
tagPOS : Str -> Str -> Str = \_,s -> s ;
tagFeature : Str -> Str -> Str -> Str = \s,_,_ -> s ;
oper
SNForm : Type = NForm ;
SNoun : Type = Noun ;
@@ -51,6 +57,9 @@ oper
oper
SAdj = {s : SAForm => Str ; h : Harmony} ;
SAdjFull = {s : Degree => SAForm => Str ; h : Harmony} ;
sAdjFull2nforms : Degree -> SAdjFull -> NForm => Str = \d,a -> (snoun2nounSep {s = \\nc => a.s ! d ! sAN nc ; h = a.h}).s ;
snoun2sadj : SNoun -> SAdj = snoun2sadjComp True ;
@@ -70,7 +79,7 @@ oper
sAAdv : SAForm = AAdv ;
sANGen : (SAForm => Str) -> Str = \a -> a ! AN (NCase Sg Gen) ;
mkAdj : (hyva,parempi,paras : SNoun) -> (hyvin,paremmin,parhaiten : Str) -> {s : Degree => SAForm => Str ; h : Harmony} = \h,p,ps,hn,pn,ph -> {
mkAdj : (hyva,parempi,paras : SNoun) -> (hyvin,paremmin,parhaiten : Str) -> SAdjFull = \h,p,ps,hn,pn,ph -> {
s = table {
Posit => table {
AN nf => h.s ! nf ;

View File

@@ -17,41 +17,41 @@ concrete StructuralFin of Structural = CatFin **
k => kaiket ! k
}
} ;
almost_AdA, almost_AdN = ss "melkein" ;
although_Subj = ss "vaikka" ;
always_AdV = ss "aina" ;
and_Conj = {s1 = [] ; s2 = "ja" ; n = Pl} ;
because_Subj = ss "koska" ;
almost_AdA, almost_AdN = ssp "ADV" "melkein" ;
although_Subj = ssp "CONJ" "vaikka" ;
always_AdV = ssp "ADV" "aina" ;
and_Conj = {s1 = [] ; s2 = tagPOS "CONJ" "ja" ; n = Pl} ;
because_Subj = ssp "CONJ" "koska" ;
before_Prep = prePrep partitive "ennen" ;
behind_Prep = postGenPrep "takana" ;
between_Prep = postGenPrep "välissä" ;
both7and_DConj = sd2 "sekä" "että" ** {n = Pl} ;
but_PConj = ss "mutta" ;
both7and_DConj = sd2 (tagPOS "CONJ" "sekä") (tagPOS "CONJ" "että") ** {n = Pl} ;
but_PConj = ssp "CONJ" "mutta" ;
by8agent_Prep = postGenPrep "toimesta" ;
by8means_Prep = casePrep adessive ;
can8know_VV = mkVV (mkV "osata" "osasi") ;
can_VV = mkVV (mkV "voida" "voi") ;
during_Prep = postGenPrep "aikana" ;
either7or_DConj = sd2 "joko" "tai" ** {n = Sg} ;
everybody_NP = lin NP (makeNP (((mkN "jokainen"))) Sg) ;
every_Det = MorphoFin.mkDet Sg (snoun2nounBind (mkN "jokainen")) ;
either7or_DConj = sd2 (tagPOS "CONJ" "joko") (tagPOS "CONJ" "tai") ** {n = Sg} ;
everybody_NP = lin NP (makeNP (((mkN "jokainen"))) Sg) ; --UD
every_Det = MorphoFin.mkDet Sg (snoun2nounBind (mkN "jokainen")) ; --UD
everything_NP = makeNP ((((mkN "kaikki" "kaiken" "kaikkena")))) Sg ;
everywhere_Adv = ss "kaikkialla" ;
few_Det = MorphoFin.mkDet Sg (snoun2nounBind (mkN "harva")) ;
everywhere_Adv = mkAdv "kaikkialla" ; --UD
few_Det = MorphoFin.mkDet Sg (snoun2nounBind (mkN "harva")) ; --UD
--- first_Ord = {s = \\n,c => (mkN "ensimmäinen").s ! NCase n c} ;
for_Prep = casePrep allative ;
from_Prep = casePrep elative ;
he_Pron = mkPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ;
here_Adv = ss "täällä" ;
here7to_Adv = ss "tänne" ;
here7from_Adv = ss "täältä" ;
how_IAdv = ss "miten" ;
how8much_IAdv = ss "kuinka paljon" ;
he_Pron = mkPersonPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ;
here_Adv = mkAdv "täällä" ;
here7to_Adv = mkAdv "tänne" ;
here7from_Adv = mkAdv "täältä" ;
how_IAdv = ssp "ADV" "miten" ;
how8much_IAdv = ssp "ADV" ("kuinka" ++ tagPOS "ADV" "paljon") ;
how8many_IDet =
{s = \\c => "kuinka" ++ (snoun2nounBind (mkN "moni" "monia")).s ! NCase Sg c ; n = Sg ; isNum = False} ;
if_Subj = ss "jos" ;
if_Subj = ssp "CONJ" "jos" ;
in8front_Prep = postGenPrep "edessä" ;
i_Pron = mkPronoun "minä" "minun" "minua" "minuna" "minuun" Sg P1 ;
i_Pron = mkPersonPronoun "minä" "minun" "minua" "minuna" "minuun" Sg P1 ;
in_Prep = casePrep inessive ;
it_Pron = {
s = \\c => pronSe.s ! npform2case Sg c ;
@@ -65,18 +65,18 @@ concrete StructuralFin of Structural = CatFin **
most_Predet = {s = \\n,c => (nForms2N (dSuurin "useinta")).s ! NCase n (npform2case n c)} ;
much_Det = MorphoFin.mkDet Sg (snoun2nounBind (exceptNomN (mkN "paljo") "paljon")) ** {isNum = True} ; --Harmony not relevant, it's just a CommonNoun
must_VV = mkVV (caseV genitive (mkV "täytyä")) ;
no_Utt = ss "ei" ;
no_Utt = ssp "INTERJ" "ei" ;
on_Prep = casePrep adessive ;
--- one_Quant = MorphoFin.mkDet Sg DEPREC
only_Predet = {s = \\_,_ => "vain"} ;
or_Conj = {s1 = [] ; s2 = "tai" ; n = Sg} ;
otherwise_PConj = ss "muuten" ;
or_Conj = {s1 = [] ; s2 = tagPOS "CONJ" "tai" ; n = Sg} ;
otherwise_PConj = ssp "ADV" "muuten" ;
part_Prep = casePrep partitive ;
please_Voc = ss ["ole hyvä"] ; --- number
possess_Prep = casePrep genitive ;
quite_Adv = ss "melko" ;
she_Pron = mkPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ;
so_AdA = ss "niin" ;
quite_Adv = ssp "ADV" "melko" ;
she_Pron = mkPersonPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ;
so_AdA = ssp "ADV" "niin" ;
somebody_NP = {
s = \\c => jokuPron ! Sg ! npform2case Sg c ;
a = agrP3 Sg ;
@@ -97,42 +97,42 @@ concrete StructuralFin of Structural = CatFin **
a = agrP3 Sg ;
isPron = False ; isNeg = False ; isNeg = False
} ;
somewhere_Adv = ss "jossain" ;
somewhere_Adv = ssp "ADV" "jossain" ;
that_Quant = heavyQuant {
s1 = table (MorphoFin.Number) {
Sg => table (MorphoFin.Case) {
c => (mkPronoun "tuo" "tuon" "tuota" "tuona" "tuohon" Sg P3).s ! NPCase c
c => (mkPersonPronoun "tuo" "tuon" "tuota" "tuona" "tuohon" Sg P3).s ! NPCase c
} ;
Pl => table (MorphoFin.Case) {
c => (mkPronoun "nuo" "noiden" "noita" "noina" "noihin" Sg P3).s ! NPCase c
c => (mkPersonPronoun "nuo" "noiden" "noita" "noina" "noihin" Sg P3).s ! NPCase c
}
} ;
s2 = \\_ => [] ; isNum,isPoss = False ; isDef = True ; isNeg = False
} ;
that_Subj = ss "että" ;
there_Adv = ss "siellä" ; --- tuolla
there7to_Adv = ss "sinne" ;
there7from_Adv = ss "sieltä" ;
therefore_PConj = ss "siksi" ;
they_Pron = mkPronoun "he" "heidän" "heitä" "heinä" "heihin" Pl P3 ; --- ne
that_Subj = ssp "CONJ" "että" ;
there_Adv = ssp "ADV" "siellä" ; --- tuolla
there7to_Adv = ssp "ADV" "sinne" ;
there7from_Adv = ssp "ADV" "sieltä" ;
therefore_PConj = ssp "ADV" "siksi" ;
they_Pron = mkPersonPronoun "he" "heidän" "heitä" "heinä" "heihin" Pl P3 ; --- ne
this_Quant = heavyQuant {
s1 = table (MorphoFin.Number) {
Sg => table (MorphoFin.Case) {
c => (mkPronoun "tämä" "tämän" "tätä" "tänä" "tähän" Sg P3).s ! NPCase c
c => (mkPersonPronoun "tämä" "tämän" "tätä" "tänä" "tähän" Sg P3).s ! NPCase c
} ;
Pl => table (MorphoFin.Case) {
c => (mkPronoun "nämä" "näiden" "näitä" "näinä" "näihin" Sg P3).s ! NPCase c
c => (mkPersonPronoun "nämä" "näiden" "näitä" "näinä" "näihin" Sg P3).s ! NPCase c
}
} ;
s2 = \\_ => [] ; isNum,isPoss = False ; isDef = True ; isNeg = False
} ;
through_Prep = postGenPrep "kautta" ;
too_AdA = ss "liian" ;
too_AdA = ssp "ADV" "liian" ;
to_Prep = casePrep illative ; --- allative
under_Prep = postGenPrep "alla" ;
very_AdA = ss "erittäin" ;
very_AdA = ssp "ADV" "erittäin" ;
want_VV = mkVV (mkV "tahtoa") ;
we_Pron = mkPronoun "me" "meidän" "meitä" "meinä" "meihin" Pl P1 ;
we_Pron = mkPersonPronoun "me" "meidän" "meitä" "meinä" "meihin" Pl P1 ;
whatPl_IP = {
s = table {NPAcc => "mitkä" ; c => mikaInt ! Pl ! npform2case Pl c} ;
n = Pl
@@ -141,9 +141,9 @@ concrete StructuralFin of Structural = CatFin **
s = \\c => mikaInt ! Sg ! npform2case Sg c ;
n = Sg
} ;
when_IAdv = ss "milloin" ;
when_Subj = ss "kun" ;
where_IAdv = ss "missä" ;
when_IAdv = ssp "ADV" "milloin" ;
when_Subj = ssp "CONJ" "kun" ;
where_IAdv = ssp "ADV" "missä" ;
which_IQuant = {
s = mikaInt
} ;
@@ -155,14 +155,14 @@ concrete StructuralFin of Structural = CatFin **
s = table {NPAcc => "ketkä" ; c => kukaInt ! Pl ! npform2case Pl c} ;
n = Pl
} ;
why_IAdv = ss "miksi" ;
why_IAdv = ssp "ADV" "miksi" ;
without_Prep = prePrep partitive "ilman" ;
with_Prep = postGenPrep "kanssa" ;
yes_Utt = ss "kyllä" ;
youSg_Pron = mkPronoun "sinä" "sinun" "sinua" "sinuna" "sinuun" Sg P2 ;
youPl_Pron = mkPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 ;
yes_Utt = ssp "INTERJ" "kyllä" ;
youSg_Pron = mkPersonPronoun "sinä" "sinun" "sinua" "sinuna" "sinuun" Sg P2 ;
youPl_Pron = mkPersonPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 ;
youPol_Pron =
let p = mkPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 in
let p = mkPersonPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 in
{s = p.s ; a = AgPol ; hasPoss = True ; poss = p.poss} ;
oper
@@ -300,8 +300,8 @@ lin
isPron = False ; isNeg = True
} ;
at_least_AdN = ss "vähintään" ;
at_most_AdN = ss "enintään" ;
at_least_AdN = ssp "ADV" "vähintään" ;
at_most_AdN = ssp "ADV" "enintään" ;
as_CAdv = X.mkCAdv "yhtä" "kuin" ;
@@ -311,5 +311,10 @@ lin
lin language_title_Utt = ss "suomi" ;
oper
ssp : Str -> Str -> {s : Str} = \p,s -> ss (tagPOS p s) ; -- used in tagged/ for Omorfi, otherwise =ss
mkPersonPronoun : (_,_,_,_,_ : Str) -> Number -> Person -> Pron = \a,b,c,d,e,n,p ->
lin Pron (MorphoFin.mkPronoun a b c d e n p) ;
}

View File

@@ -27,7 +27,7 @@ lin
SymbS sy = sy ;
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
SymbOrd n = {s = \\_ => n.s ++ "."} ;
SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat

View File

@@ -4,6 +4,12 @@ resource StemFin = open MorphoFin, Prelude in {
flags coding = utf8 ;
oper
-- other classes not treated below are POS tagged when the grammar is used with Omorfi
tagPOS : Str -> Str -> Str = \_,s -> s ;
tagFeature : Str -> Str -> Str -> Str = \s,_,_ -> s ;
oper
SNForm : Type = Predef.Ints 10 ;
SNoun : Type = {s : SNForm => Str ; h : Harmony} ;
@@ -125,6 +131,9 @@ param
oper
SAdj = {s : SAForm => Str ; h : Harmony} ;
SAdjFull = {s : Degree => SAForm => Str ; h : Harmony} ;
sAdjFull2nforms : Degree -> SAdjFull -> NForm => Str = \d,a -> (snoun2nounSep {s = \\nc => a.s ! d ! sAN nc ; h = a.h}).s ;
snoun2sadj : SNoun -> SAdj = snoun2sadjComp True ;

View File

@@ -0,0 +1,12 @@
--# -path=.:..:../../abstract:../../common:../../api
concrete LangFin of Lang =
GrammarFin,
LexiconFin
, ConstructionFin
, DocumentationFin --# notpresent
** {
flags startcat = Phr ; unlexer = text ; lexer = finnish ;
} ;

Some files were not shown because too many files have changed in this diff Show More