From c00035d9a9c08d5a4533d87afde7c1641a48cba3 Mon Sep 17 00:00:00 2001 From: Le Tuan Anh Date: Fri, 14 May 2021 00:02:14 +0800 Subject: [PATCH 1/7] Update README.md --- README.md | 99 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 66 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 09eac95..da8c1be 100644 --- a/README.md +++ b/README.md @@ -2,40 +2,10 @@ A Python 3 implementation of the [Integrated Semantic Framework](https://osf.io/9udjk/) that provides computational deep semantic analysis by combining structural semantics from construction grammars and lexical semantics from ontologies in a single representation. -# Install - -`coolisf` only works on Linux distributions at the moment (built and tested on Fedora and Ubuntu Linux). +`coolisf` is only a back-end semantic parsing module that runs on command-line interaface or in Python programs. +If you want a friendly graphical user interface, please use [visualkopasu](https://github.com/letuananh/visualkopasu/). -- Install `coolisf` package from [PyPI](https://pypi.org/project/coolisf/) using pip - -``` -pip install coolisf -``` - -- Create coolisf data folder at `/home/user/local/isf/data` -- Download ace-0.9.26 binary from https://osf.io/x52fy/ to `/home/user/bin/ace`. Make sure that you can run ace by - -```bash -[isf]$ ~/bin/ace -V -ACE version 0.9.26 -compiled at 18:48:50 on Sep 14 2017 -``` - -- Install [lelesk](https://pypi.org/project/lelesk/) and yawlib with data -- Download coolisf lexical rules database from https://osf.io/qn4wz/ and extract it to `/home/user/local/isf/data/lexrules.db` -- Download grammar files (erg.dat, jacy.dat, virgo.dat, etc.) and copy them to `/home/user/local/isf/data/grammars/` - -The final data folder should look something like this - -``` -/home/user/local/isf/data -├── grammars -│   ├── erg.dat -│   └── jacy.dat -├── lexrules.db -``` - -# Using ISF +# A quick glance To parse a sentence, use coolisf `text` command @@ -77,4 +47,67 @@ After that, run the following command and the output will be written to the file python -m coolisf parse demo.txt -o demo_out.xml ``` +In Python code + +```python +from coolisf import GrammarHub +ghub = GrammarHub() +# parse an English text +sent = ghub.ERG_ISF.parse("I love drip coffee.") +# print semantic structures for all potential readings +for reading in sent: + print(reading.dmrs()) +``` + +Output + +```bash +dmrs { + 10000 [pron<0:1> x ind=+ num=sg pers=1 pt=std]; + 10001 [pronoun_q<0:1> x ind=+ num=sg pers=1 pt=std]; + 10002 [_love_v_1_rel<2:6> e mood=indicative perf=- prog=- sf=prop tense=pres]; + 10003 [udef_q<7:19> x num=sg pers=3]; + 10004 [_drip+coffee_n_1_rel<7:19> x num=sg pers=3]; + 0:/H -> 10002; + 10001:RSTR/H -> 10000; + 10002:ARG1/NEQ -> 10000; + 10002:ARG2/NEQ -> 10004; + 10003:RSTR/H -> 10004; +} +... +``` + +# Install + +`coolisf` only works on Linux distributions at the moment (built and tested on Fedora and Ubuntu Linux). + +- Install `coolisf` package from [PyPI](https://pypi.org/project/coolisf/) using pip + +``` +pip install coolisf +``` + +- Create coolisf data folder at `/home/user/local/isf/data` +- Download ace-0.9.26 binary from https://osf.io/x52fy/ to `/home/user/bin/ace`. Make sure that you can run ace by + +```bash +[isf]$ ~/bin/ace -V +ACE version 0.9.26 +compiled at 18:48:50 on Sep 14 2017 +``` + +- Install [lelesk](https://pypi.org/project/lelesk/) and yawlib with data +- Download coolisf lexical rules database from https://osf.io/qn4wz/ and extract it to `/home/user/local/isf/data/lexrules.db` +- Download grammar files (erg.dat, jacy.dat, virgo.dat, etc.) and copy them to `/home/user/local/isf/data/grammars/` + +The final data folder should look something like this + +``` +/home/user/local/isf/data +├── grammars +│   ├── erg.dat +│   └── jacy.dat +├── lexrules.db +``` + If you encounter any issue, please submit an issue at: https://github.com/letuananh/intsem.fx/issues From 903aff3cca12531c1e25c6d6f88ad1f6b91bdb7b Mon Sep 17 00:00:00 2001 From: Le Tuan Anh Date: Fri, 14 May 2021 00:13:15 +0800 Subject: [PATCH 2/7] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da8c1be..91e836c 100644 --- a/README.md +++ b/README.md @@ -110,4 +110,4 @@ The final data folder should look something like this ├── lexrules.db ``` -If you encounter any issue, please submit an issue at: https://github.com/letuananh/intsem.fx/issues +If you encounter any problems or difficulties, please submit a ticket for support at: https://github.com/letuananh/intsem.fx/issues From 024fa63ff52da59d6f36fffa2268243b067baca6 Mon Sep 17 00:00:00 2001 From: Le Tuan Anh Date: Fri, 14 May 2021 00:25:37 +0800 Subject: [PATCH 3/7] Update README.md --- README.md | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 91e836c..aeb8555 100644 --- a/README.md +++ b/README.md @@ -77,37 +77,16 @@ dmrs { ... ``` -# Install - -`coolisf` only works on Linux distributions at the moment (built and tested on Fedora and Ubuntu Linux). - -- Install `coolisf` package from [PyPI](https://pypi.org/project/coolisf/) using pip +Fore more information, please refer to the documentation for coolisf at https://coolisf.readthedocs.io -``` -pip install coolisf -``` +# Install -- Create coolisf data folder at `/home/user/local/isf/data` -- Download ace-0.9.26 binary from https://osf.io/x52fy/ to `/home/user/bin/ace`. Make sure that you can run ace by +The `coolisf` package itself is available on [PyPI](https://pypi.org/project/coolisf/) can can be installed using pip ```bash -[isf]$ ~/bin/ace -V -ACE version 0.9.26 -compiled at 18:48:50 on Sep 14 2017 +pip install coolisf ``` -- Install [lelesk](https://pypi.org/project/lelesk/) and yawlib with data -- Download coolisf lexical rules database from https://osf.io/qn4wz/ and extract it to `/home/user/local/isf/data/lexrules.db` -- Download grammar files (erg.dat, jacy.dat, virgo.dat, etc.) and copy them to `/home/user/local/isf/data/grammars/` - -The final data folder should look something like this - -``` -/home/user/local/isf/data -├── grammars -│   ├── erg.dat -│   └── jacy.dat -├── lexrules.db -``` +However, to acquire all required components and data can be tricky. Please find version specific prerequisites and installation instructions on coolisf's [official Github release page](https://github.com/letuananh/intsem.fx/releases). If you encounter any problems or difficulties, please submit a ticket for support at: https://github.com/letuananh/intsem.fx/issues From 6298919cce16f276aa4ae1ac0224b5ccc43d57a7 Mon Sep 17 00:00:00 2001 From: Le Tuan Anh Date: Fri, 14 May 2021 00:32:17 +0800 Subject: [PATCH 4/7] update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aeb8555..a88b7e1 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# Integrated Semantic Framework (intsem.fx) +# Integrated Semantic Framework A Python 3 implementation of the [Integrated Semantic Framework](https://osf.io/9udjk/) that provides computational deep semantic analysis by combining structural semantics from construction grammars and lexical semantics from ontologies in a single representation. `coolisf` is only a back-end semantic parsing module that runs on command-line interaface or in Python programs. If you want a friendly graphical user interface, please use [visualkopasu](https://github.com/letuananh/visualkopasu/). -# A quick glance +## A quick glance To parse a sentence, use coolisf `text` command @@ -41,13 +41,13 @@ A soul is not a living thing. Do you have any green tea chest? ``` -After that, run the following command and the output will be written to the file `demo_out.xml` +After that, run the following `parse` command to analyse the text and write the output to `demo_out.xml` ```bash python -m coolisf parse demo.txt -o demo_out.xml ``` -In Python code +Here is an example of using coolisf in a Python code ```python from coolisf import GrammarHub @@ -79,7 +79,7 @@ dmrs { Fore more information, please refer to the documentation for coolisf at https://coolisf.readthedocs.io -# Install +## Install The `coolisf` package itself is available on [PyPI](https://pypi.org/project/coolisf/) can can be installed using pip From 8702ed4bb37132f2c4c593fc168f61171c512c6e Mon Sep 17 00:00:00 2001 From: Le Tuan Anh Date: Fri, 14 May 2021 00:33:48 +0800 Subject: [PATCH 5/7] update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a88b7e1..c50542a 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ dmrs { ``` For batch processing, create a text file with each sentence on a separate line. -For example here is the content of the file `sample.txt` +For example here is the content of the file `demo.txt` ``` I drink green tea. From ba286d8ca2d89593787c3a7e86d806b7bdd66588 Mon Sep 17 00:00:00 2001 From: Le Tuan Anh Date: Fri, 14 May 2021 00:36:07 +0800 Subject: [PATCH 6/7] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c50542a..b65c757 100644 --- a/README.md +++ b/README.md @@ -81,12 +81,12 @@ Fore more information, please refer to the documentation for coolisf at https:// ## Install -The `coolisf` package itself is available on [PyPI](https://pypi.org/project/coolisf/) can can be installed using pip +The `coolisf` package itself is available on [PyPI](https://pypi.org/project/coolisf/) and it can be installed using pip ```bash pip install coolisf ``` -However, to acquire all required components and data can be tricky. Please find version specific prerequisites and installation instructions on coolisf's [official Github release page](https://github.com/letuananh/intsem.fx/releases). +However, it can be tricky to acquire all the required components and data. Please find version specific prerequisites and installation instructions on coolisf's [official Github release page](https://github.com/letuananh/intsem.fx/releases). If you encounter any problems or difficulties, please submit a ticket for support at: https://github.com/letuananh/intsem.fx/issues From c25aa907ba22900fa26c81793aa2fb577bd182ad Mon Sep 17 00:00:00 2001 From: Le Tuan Anh Date: Fri, 14 May 2021 00:40:30 +0800 Subject: [PATCH 7/7] coolisf version 0.2.3 stable ready --- coolisf/__version__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coolisf/__version__.py b/coolisf/__version__.py index 40502a6..bda7d18 100644 --- a/coolisf/__version__.py +++ b/coolisf/__version__.py @@ -14,6 +14,6 @@ __issue__ = "https://github.com/letuananh/intsem.fx/" __maintainer__ = "Le Tuan Anh" __version_major__ = "0.2.3" # follow PEP-0440 -__version__ = "{}rc".format(__version_major__) -__version_long__ = "{} - Release Candidate".format(__version_major__) -__status__ = "4 - Beta" +__version__ = "{}".format(__version_major__) +__version_long__ = "{}".format(__version_major__) +__status__ = "5 - Production/Stable"