Beispiel #1
0
                    debug=True),
                ELEMENT('bill',
                        attrnames=['mp', 'sc'],
                        attrmap={
                            'type': '"commitee_reported"',
                            'billname': '"$act1"'
                        }), fd_parse.TRACE(False, envlength=512)),
            passback={
                'act1': 'billname',
                'sc': 'sc'
            }),
        DEBUG('committee_reported found'),
        fd_parse.TRACE(False),
        SEQ(
            plaintextpar(
                'Bill, as amended in the Standing Committee, to be considered to-morrow; and to be printed [Bill %(number1)].'
            ),
            ELEMENT('bill',
                    billno="$number1",
                    billname="$billname",
                    type="'printing'"),
            #
            # I'm not sure what follows produces the right element.
            plaintextpar(
                'Minutes of Proceedings of the Committee to be printed [No. %(number2)].'
            ),
            ELEMENT('bill',
                    billno="$number1",
                    billname="$billname",
                    type="'printing'"))))
Beispiel #2
0
testdic={}

number=DEFINE('number', pattern('\d+'))

DEFINE('enprint', pattern('\d+-EN'))
DEFINE('act', pattern('[-a-z.,A-Z0-9()\s]*?'), fragment=True)
DEFINE('year', pattern('\d{4}'))

s='start%(number)end'
s1='%(number1)-%(number2)'
s2='<i>Ordered</i>, That the Explanatory Notes (relating )?to the %(act2) be printed [Bill %(enprint)].'
s3='<i>Ordered</i>, That the Explanatory Notes (relating )?to the %(act2) be printed \[Bill %(enprint)\].'

from fd_parse import sub, plaintext, prep_plaintext, tagged, tagpatterns, plaintextpar

actparse=plaintextpar('the %(act) Act %(year).')
egact='the theft act 1968'

#plaintext('<i>Ordered</i>, That the Explanatory Notes (relating )?to the %(act2) be printed [Bill %(enprint)].'

s4='Bill, as amended in the Standing Committee, to be considered to-morrow; and to be printed [Bill %(number1)].'
p4=prep_plaintext(s4)

from fd_parse import *

o=OUT('$today')
#('', tenv)

a=pattern('4')
b=pattern('5')
s=SEQ(a,b)
Beispiel #3
0
			ELEMENT('bill',
				attrnames=['mp','sc'],
				attrmap={
					'type' : '"commitee_reported"',
					'billname': '"$act1"'
					}
				),
			fd_parse.TRACE(False, envlength=512)),
			passback={
				'act1' : 'billname',
				'sc' : 'sc'}), 
		DEBUG('committee_reported found'),
		fd_parse.TRACE(False),
		SEQ(
			plaintextpar(

'Bill, as amended in the Standing Committee, to be considered to-morrow; and to be printed [Bill %(number1)].'),
			ELEMENT('bill', 
				billno="$number1",
				billname="$billname",
				type="'printing'"
				),
#
# I'm not sure what follows produces the right element.
			plaintextpar(

'Minutes of Proceedings of the Committee to be printed [No. %(number2)].'),
			ELEMENT('bill',
				billno="$number1",
				billname="$billname",
				type="'printing'"