U
    ƒe‹	  ã                   @   s¸   d Z ddlmZ ddlmZmZ ddlmZmZm	Z	m
Z
mZmZmZmZ ddlmZ ddlmZmZmZmZmZmZmZmZ ddlmZmZmZ ddlmZ dd	l m!Z!m"Z"m#Z#m$Z$ d
S )a9  
NLTK Semantic Interpretation Package

This package contains classes for representing semantic structure in
formulas of first-order logic and for evaluating such formulas in
set-theoretic models.

    >>> from nltk.sem import logic
    >>> logic._counter._value = 0

The package has two main components:

 - ``logic`` provides support for analyzing expressions of First
   Order Logic (FOL).
 - ``evaluate`` allows users to recursively determine truth in a
   model for formulas of FOL.

A model consists of a domain of discourse and a valuation function,
which assigns values to non-logical constants. We assume that entities
in the domain are represented as strings such as ``'b1'``, ``'g1'``,
etc. A ``Valuation`` is initialized with a list of (symbol, value)
pairs, where values are entities, sets of entities or sets of tuples
of entities.
The domain of discourse can be inferred from the valuation, and model
is then created with domain and valuation as parameters.

    >>> from nltk.sem import Valuation, Model
    >>> v = [('adam', 'b1'), ('betty', 'g1'), ('fido', 'd1'),
    ... ('girl', set(['g1', 'g2'])), ('boy', set(['b1', 'b2'])),
    ... ('dog', set(['d1'])),
    ... ('love', set([('b1', 'g1'), ('b2', 'g2'), ('g1', 'b1'), ('g2', 'b1')]))]
    >>> val = Valuation(v)
    >>> dom = val.domain
    >>> m = Model(dom, val)
é    )ÚBoxer)ÚDRSÚDrtExpression)Ú
AssignmentÚModelÚ	UndefinedÚ	ValuationÚarityÚis_relÚread_valuationÚset2rel)Ú
FStructure)ÚApplicationExpressionÚ
ExpressionÚLogicalExpressionExceptionÚVariableÚbinding_opsÚboolean_opsÚequality_predsÚ
read_logic)ÚclauseÚextract_relsÚrtuple)Ú	skolemize)Úevaluate_sentsÚinterpret_sentsÚparse_sentsÚroot_semrepN)%Ú__doc__Znltk.sem.boxerr   Znltk.sem.drtr   r   Znltk.sem.evaluater   r   r   r   r	   r
   r   r   Znltk.sem.lfgr   Znltk.sem.logicr   r   r   r   r   r   r   r   Znltk.sem.relextractr   r   r   Znltk.sem.skolemizer   Znltk.sem.utilr   r   r   r   © r   r   úR/var/www/html/assets/scripts/venv/lib/python3.8/site-packages/nltk/sem/__init__.pyÚ<module>   s   $(
(
