Skip to main content

No project description provided

Project description

PyFCG

A Python interface to FCG and Babel, built on FCG Go.

Installation

To install this package from PyPI, run the following command.

pip install pyfcg

Use

Start a PyFCG session with:

import pyfcg as fcg
fcg.init()

This starts up FCG Go, listening at port 9600.

Then:

# Creating a new FCG agent
fcg_agent = fcg.Agent()

# Starting up the web interface and activating the trace-fcg monitor
fcg.start_web_interface()
fcg.activate_monitor('trace-fcg')

Optionally, you can test to add a construction to the agent's grammar:

cxn = fcg.Construction(name= 'good-morning-cxn', 
                       contributing_pole = [('?good-morning-unit',
                                            {'referent': '?m',
                                             'category': 'greeting',
                                             'form-args': ('?start', '?end')})],
                       conditional_pole = [('?good-morning-unit',
                                            {'#meaning': [('morning', '?m'), ('good-02', '?g'), (':arg1-of', '?m', '?g')]},
                                            {'#form': [('sequence', '"Good morning!"', '?start', '?end')]})])
fcg_agent.add_cxn(cxn)
fcg_agent.comprehend("Good morning!")                            

And you can enjoy everything at http://localhost:8010 !

Documentation

Full documentation of this package, including examples can be found on pyfcg.readthedocs.io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfcg-0.1b3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfcg-0.1b3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file pyfcg-0.1b3.tar.gz.

File metadata

  • Download URL: pyfcg-0.1b3.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyfcg-0.1b3.tar.gz
Algorithm Hash digest
SHA256 b5880d9a61619bce282f017e920074fdb1bdb40ee338e1429bbfc8454a21de80
MD5 8d4b5643f5b7102e9e0b51d0816dcb18
BLAKE2b-256 0cafec7bffba7374a64e9f466e54826070863a3f080bc4ecde6e024792e671d1

See more details on using hashes here.

File details

Details for the file pyfcg-0.1b3-py3-none-any.whl.

File metadata

  • Download URL: pyfcg-0.1b3-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyfcg-0.1b3-py3-none-any.whl
Algorithm Hash digest
SHA256 00d3a08eb5a3396806986c210cd5e3d551b48afdb6584c332a4e54a45a95faf2
MD5 2878ee669563b28a941bc0d3aec839a2
BLAKE2b-256 73f5b6f2ab90a6600545ba0079992391f6e5d82b296d4647144fb8ad7ff1c4cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page