Пример #1
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('dictionary', sys.argv)
    test.run({
        'name':
        'Dictionary',
        'groups': [
            {
                'name':
                'Cainteoir',
                'type':
                'dictionary',
                'args': ['--list'],
                'tests': [
                    {
                        'test': '../data/locale/en/cardinal.dict',
                        'result': 'dict/cainteoir/en-cardinal.lst'
                    },  # say-as (word => word)
Пример #2
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('diphones', sys.argv)
    test.run({
        'name':
        'Diphones',
        'groups': [
            {
                'name':
                'Duration',
                'type':
                'diphones',
                'tests': [
                    {
                        'test': 'diphone/duration/no-pauses.pho',
                        'result': 'diphone/duration/no-pauses.dipho',
                        'phonemeset': 'radio'
                    },
Пример #3
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('phonemeset', sys.argv)
    test.run({
        'name':
        'Feature-Based',
        'groups': [
            {
                'name':
                'Features',
                'type':
                'phonemeset',
                'tests': [
                    {
                        'test': 'phonemeset/ipa/phonemes.features',
                        'result': 'phonemeset/ipa/phonemes.features',
                        'from': 'features',
                        'to': 'features',
Пример #4
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('XMLReader', sys.argv)
    test.run({
        'name':
        'XMLReader',
        'groups': [
            {
                'name':
                'text',
                'type':
                'xmlreader',
                'tests': [
                    {
                        'test': 'xmlparser/text/basic.xml',
                        'result': 'xmlparser/text/basic.tags'
                    },
                    {
Пример #5
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('prosody', sys.argv)
    test.run({
        'name':
        'Phonemes',
        'phonemeset':
        'cxs',
        'groups': [
            {
                'name':
                'Grouping',
                'type':
                'prosody',
                'fixed-duration':
                '80ms',
                'tests': [
                    {
Пример #6
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
	test = harness.TestSuite('media-stream', sys.argv)
	test.run({ 'name': 'ePub3', 'groups': [
		{'name': 'media overlay', 'type': 'media-stream', 'tests': [
			{'test': 'epub3/media-overlay/single-file/xhtml-before-smil.epub', 'result': 'epub3/media-overlay/single-file/xhtml-before-smil.csv'},
			{'test': 'epub3/media-overlay/single-file/xhtml-after-smil.epub', 'result': 'epub3/media-overlay/single-file/xhtml-before-smil.csv'},
			{'test': 'epub3/media-overlay/single-file/text-but-no-audio.epub', 'result': 'epub3/media-overlay/single-file/text-but-no-audio.csv'},
			{'test': 'epub3/media-overlay/multiple-files/multiple.epub', 'result': 'epub3/media-overlay/multiple-files/multiple.csv'},
			{'test': 'epub3/media-overlay/multiple-files/spanning.epub', 'result': 'epub3/media-overlay/multiple-files/multiple.csv'},
			{'test': 'epub3/media-overlay/multiple-files/spanning-different-id.epub', 'result': 'epub3/media-overlay/multiple-files/multiple.csv'},
			{'test': 'epub3/media-overlay/single-file/comma-and-quotes.epub', 'result': 'epub3/media-overlay/single-file/comma-and-quotes.csv'},
			{'test': 'epub3/media-overlay/single-file/nested-blocks.epub', 'result': 'epub3/media-overlay/single-file/comma-and-quotes.csv'},
			{'test': 'epub3/media-overlay/single-file/id-on-spans.epub', 'result': 'epub3/media-overlay/single-file/comma-and-quotes.csv', 'expect': 'fail'},
			{'test': 'epub3/media-overlay/single-file/br-in-text.epub', 'result': 'epub3/media-overlay/single-file/br-in-text.csv'},
		]},
	]})
	test.summary()
Пример #7
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('units', sys.argv)
    test.run({
        'name':
        'Units',
        'phonemeset':
        'cxs',
        'groups': [
            {
                'name':
                'Phoneme Mapping',
                'type':
                'units',
                'fixed-duration':
                '100ms',
                'tests': [
                    {
Пример #8
0
                    'ipa',
                    'accent':
                    locale
                },
                {
                    'test': 'accent/{0}/phonemes.ipa'.format(language),
                    'result':
                    'accent/{0}/phonemes.{1}'.format(language, locale),
                    'from': 'ipa',
                    'to': 'ipa',
                    'accent': locale
                },
            ]
        }

    test = harness.TestSuite('accent', sys.argv)

    test.run({
        'name':
        'Edge Cases',
        'groups': [
            {
                'name':
                'Phoneme-to-Phoneme',
                'type':
                'phonemeset',
                'tests': [
                    {
                        'test': 'accent/match-at-end.ipa',
                        'result': 'accent/match-at-end.cmu',
                        'from': 'ipa',
Пример #9
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
	test = harness.TestSuite('phoneme-stress', sys.argv)
	test.run({'name': 'Syllabification', 'type': 'phonemes', 'args': ['--syllables'], 'from': 'cxs', 'to': 'cxs', 'tests': [
		{'test': 'phoneme_stress/syllable-stressed.cxs', 'result': 'phoneme_stress/syllable-stressed.syl'},
		{'test': 'phoneme_stress/syllable-stressed-cv-nosep.cxs', 'result': 'phoneme_stress/syllable-stressed-cv.syl'},
		{'test': 'phoneme_stress/syllable-stressed-cvc-nosep.cxs', 'result': 'phoneme_stress/syllable-stressed-cvc.syl'},
		{'test': 'phoneme_stress/syllable-stressed-cvc-afr-nosep.cxs', 'result': 'phoneme_stress/syllable-stressed-cvc-afr.syl'},
		{'test': 'phoneme_stress/syllable-stressed-cvcc-nosep.cxs', 'result': 'phoneme_stress/syllable-stressed-cvcc.syl'},
		{'test': 'phoneme_stress/vowel-stressed.cxs', 'result': 'phoneme_stress/vowel-stressed.syl'},
		{'test': 'phoneme_stress/vowel-stressed-cv-nosep.cxs', 'result': 'phoneme_stress/vowel-stressed-cv.syl'},
		{'test': 'phoneme_stress/vowel-stressed-cvc-nosep.cxs', 'result': 'phoneme_stress/vowel-stressed-cvc.syl'},
		{'test': 'phoneme_stress/vowel-stressed-cvc-afr-nosep.cxs', 'result': 'phoneme_stress/vowel-stressed-cvc-afr.syl'},
		{'test': 'phoneme_stress/vowel-stressed-cvcc-nosep.cxs', 'result': 'phoneme_stress/vowel-stressed-cvcc.syl'},
	]})
	test.run({'name': 'As Transcribed', 'type': 'phonemes', 'args': [], 'from': 'cxs', 'to': 'cxs', 'tests': [
		{'test': 'phoneme_stress/syllable-stressed.cxs', 'result': 'phoneme_stress/syllable-stressed.cxs'},
		{'test': 'phoneme_stress/syllable-stressed-cv-nosep.cxs', 'result': 'phoneme_stress/syllable-stressed-cv-nosep.cxs'},
Пример #10
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('styles', sys.argv)
    test.run({
        'name':
        'CSS Counter Styles',
        'groups': [
            {
                'name':
                '@counter-style',
                'type':
                'styles',
                'tests': [
                    {
                        'test': 'css/counter-styles/empty.css',
                        'result': 'css/counter-styles/empty.styles'
                    },
                    {
Пример #11
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('rewrite', sys.argv)
    test.run({
        'name':
        'Rewrite',
        'groups': [
            {
                'name':
                'Pinyin',
                'type':
                'rewrite',
                'tests': [
                    {
                        'test': 'letter2phoneme/cantonese.txt',
                        'result': 'letter2phoneme/cantonese.rewrite',
                        'ruleset': 'letter2phoneme/cantonese.ldb'
                    },
Пример #12
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('parsetext', sys.argv)
    test.run({
        'name':
        'Parse Text',
        'groups': [
            {
                'name':
                'Latin',
                'type':
                'parsetext',
                'tests': [
                    {
                        'test': 'parse-text/latin/words.txt',
                        'result': 'parse-text/latin/words.pt'
                    },
                    {
Пример #13
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('VorbisComments', sys.argv)
    test.run({
        'name':
        'Vorbis Comments',
        'groups': [
            {
                'name':
                'ePub 2.0 Dublin Core',
                'type':
                'vorbis',
                'tests': [
                    {
                        'test': 'opf/vorbis-comments/simple.opf',
                        'result': 'opf/vorbis-comments/simple.txt'
                    },
                    {
Пример #14
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('HTMLTree', sys.argv)
    test.run({
        'name':
        'HTML',
        'groups': [
            {
                'name':
                '12.2.5.4.2: before html',
                'type':
                'htmlreader',
                'tests': [
                    {
                        'test': 'html/tree-construction/simple.html',
                        'result': 'html/tree-construction/simple.tags'
                    },
                    {
Пример #15
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cainteoir-engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cainteoir-engine.  If not, see <http://www.gnu.org/licenses/>.

import harness
import sys

if __name__ == '__main__':
    test = harness.TestSuite('letter2phoneme', sys.argv)
    test.run({
        'name':
        'Letter To Phoneme',
        'groups': [
            {
                'name':
                'Context',
                'type':
                'rewrite',
                'args': ['--phonemes'],
                'tests': [
                    {
                        'test': 'letter2phoneme/context.txt',
                        'result': 'letter2phoneme/context.ps',
                        'ruleset': 'letter2phoneme/context.ldb'