Integrated Semantic Framework
A Python 3 implementation of the Integrated Semantic Framework 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.
A quick glance
To parse a sentence, use coolisf text command
python -m coolisf text "I drink green tea." -f dmrs
:`I drink green tea.` (len=5)
------------------------------------------------------------
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 [_drink_v_1_rel<2:7> e mood=indicative perf=- prog=- sf=prop tense=pres];
10003 [udef_q<8:18> x num=sg pers=3];
10004 [_green+tea_n_1_rel<8:18> x num=sg pers=3];
0:/H -> 10002;
10001:RSTR/H -> 10000;
10002:ARG1/NEQ -> 10000;
10002:ARG2/NEQ -> 10004;
10003:RSTR/H -> 10004;
}
# 10002 -> 01170052-v[drink/lelesk]
# 10004 -> 07935152-n[green tea/lelesk]
...
For batch processing, create a text file with each sentence on a separate line.
For example here is the content of the file demo.txt
I drink green tea.
Sherlock Holmes has three guard dogs.
A soul is not a living thing.
Do you have any green tea chest?
After that, run the following parse command to analyse the text and write the output to demo_out.xml
python -m coolisf parse demo.txt -o demo_out.xml
Here is an example of using coolisf in a Python code
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
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;
}
...
Fore more information, please refer to the documentation for coolisf at https://coolisf.readthedocs.io
Install
The coolisf package itself is available on PyPI and it can be installed using pip
pip install coolisf
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.
If you encounter any problems or difficulties, please submit a ticket for support at: https://github.com/letuananh/intsem.fx/issues
Metadata
Release files for coolisf 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| coolisf-0.2.3.tar.gz | 734.1 kB | Without provenance | Details for coolisf-0.2.3.tar.gz |
Release files / coolisf-0.2.3.tar.gz
| Download URL | coolisf-0.2.3.tar.gz |
|---|---|
| Size | 734.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44b4c5f9ab93a1dc5c9c9d58c8711b0f810d02f2de4d61627c8965f0b9260cc3
|
|
BLAKE2b-256 checksum How to use checksums |
66fb6a8734faa93e90832f60f38edfc5deb6c9c7a114313eac3bd987b8fef887
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.9
|
Security for coolisf 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.