<commit_before>#!/usr/bin/python
# vim:sw=8:ts=8:et:nowrap

# A very experimental program to parse votes and proceedings files.

# At the moment this file contains absolute paths, until someone can show me
# how to avoid them. Hence is unlikely to be unuseable.

import sys
import os
import os.path
import re
import parselib
from parselib import SEQ, OR,  ANY, POSSIBLY, IF, START, END, OBJECT, NULL, OUT, DEBUG, STOP, FORCE, pattern, tagged

from xmlfilewrite import WriteXMLHeader

# Names may have dots and hyphens in them.
def namepattern(label='name'):
	return '(?P<'+label+'>[-A-Za-z .]+)'

# Time handling

engnumber60='(one|two|three|four|five|six(?!ty)|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|((twenty|thirty|forty|fifty)(-(one|two|three|four|five|six|seven|eight|nine))?))'

archtime=SEQ(
	pattern('\s*(?P<archtime>(a quarter past|half-past|a quarter to|'+engnumber60+' minutes to|)\s*(one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve)(\s*o\'clock)?)(?i)'),
	OBJECT('time','','archtime')
	)

dayname=pattern('\s*(?P<dayname>(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday))\s*')<commit_msg>Fix include path<commit_after>#!/usr/bin/python
# vim:sw=8:ts=8:et:nowrap

# A very experimental program to parse votes and proceedings files.

# At the moment this file contains absolute paths, until someone can show me
# how to avoid them. Hence is unlikely to be unuseable.

import sys
import os
import os.path
import re
import parselib
from parselib import SEQ, OR,  ANY, POSSIBLY, IF, START, END, OBJECT, NULL, OUT, DEBUG, STOP, FORCE, pattern, tagged

sys.path.append("../")
from xmlfilewrite import WriteXMLHeader

# Names may have dots and hyphens in them.
def namepattern(label='name'):
	return '(?P<'+label+'>[-A-Za-z .]+)'

# Time handling

engnumber60='(one|two|three|four|five|six(?!ty)|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|((twenty|thirty|forty|fifty)(-(one|two|three|four|five|six|seven|eight|nine))?))'

archtime=SEQ(
	pattern('\s*(?P<archtime>(a quarter past|half-past|a quarter to|'+engnumber60+' minutes to|)\s*(one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve)(\s*o\'clock)?)(?i)'),
	OBJECT('time','','archtime')
	)

dayname=pattern('\s*(?P<dayname>(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday))\s*')
{'fraction_non_alphanumeric': 0.16792294807370184, 'fraction_numerical': 0.005025125628140704, 'mean_word_length': 7.6872727272727275, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5660752', 'n_tokens_mistral': 898, 'n_tokens_neox': 853, 'n_words': 186}