Exemplo n.º 1
0
def articulate(dom, name, types, type=Articulate, statement=log_statement):
    dom.pns_name = name
    dom.xml_types = types
    dom.xml_type = type
    dom.xml_unicoding = 0
    dom.pns_statement = statement
    dom.pns_sat_language = pns_sat.language()
    return dom
Exemplo n.º 2
0
def articulate (
        dom, name, types, 
        type=Articulate, statement=log_statement
        ):
        dom.pns_name = name
        dom.xml_types = types
        dom.xml_type = type
        dom.xml_unicoding = 0
        dom.pns_statement = statement
        dom.pns_sat_language = pns_sat.language ()
        return dom
Exemplo n.º 3
0
# -*- coding: CP1252 -*-

from allegra import netstring, loginfo, pns_sat

def log_articulated (articulated):
        for horizon, field, name, text in articulated:
                loginfo.log (text)
                loginfo.log (netstring.netoutline (name))

articulated = []
text = (
        'A just machine to make big decisions\n'
        'Programmed by fellows with compassion and vision'
        )
name = pns_sat.articulate_re (
        text, articulated.append, pns_sat.language ('en')
        )
log_articulated (articulated)

articulated = []
text = (
        "Ce qui se conçoit bien s'énonce clairement\n"
        "Et les mots pour le dire arrivent aisément"
        )
name = pns_sat.articulate_re (
        text, articulated.append, pns_sat.language ('fr')
        )
log_articulated (articulated)

articulated = []
text = (
Exemplo n.º 4
0
 def xml_valid(self, dom):
     parent = self.xml_parent()
     if parent.xml_name == 'channel':
         dom.pns_sat_language = pns_sat.language(self.xml_first)
Exemplo n.º 5
0
 def xml_valid (self, dom):
         parent = self.xml_parent ()
         if parent.xml_name == 'channel':
                 dom.pns_sat_language = pns_sat.language (
                         self.xml_first
                         )