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.1b2.tar.gz (10.9 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.1b2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyfcg-0.1b2.tar.gz
Algorithm Hash digest
SHA256 1ad60f059741daabdcbd0aa7926c9cf79ef54e68e76c25d825b90af209c6dedd
MD5 72ccdb660e25b45656d2660765e0099c
BLAKE2b-256 ecadb13f4bbf69d17244f6312798e45229ebf5a5a2e62ebd7951beae3fb87d3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfcg-0.1b2-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.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 f497f13edb8e9629894fe134d55d37d33fff2bdcacc35d58bebd4a34773e2846
MD5 0a8aec779e5b24b17b59f3a6e494b144
BLAKE2b-256 691f29e94742ac88cc5c0ee53345ffb7c4c1a150950bd4398cfac016d74764d0

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