RegressionTests__PhonemStringComparatorTest.st
author Stefan Vogel <sv@exept.de>
Tue, 11 Jun 2019 10:34:41 +0200
changeset 2321 32ea6329f5ad
parent 2171 7e1468f91656
permissions -rw-r--r--
class: stx_goodies_regression class changed: #classNamesAndAttributes make classes autoloaded that stc cannot compile (yet)

"{ Package: 'stx:goodies/regression' }"

"{ NameSpace: RegressionTests }"

TestCase subclass:#PhonemStringComparatorTest
	instanceVariableNames:'sc'
	classVariableNames:''
	poolDictionaries:''
	category:'tests-Regression-Collections-Utilities'
!


!PhonemStringComparatorTest methodsFor:'initialize / release'!

setUp
    sc := PhoneticStringUtilities::PhonemStringComparator new

    "Modified: / 28-07-2017 / 16:03:19 / cg"
! !

!PhonemStringComparatorTest methodsFor:'tests'!

test02_WellKnownResults
    "tests some wellknown phonem codes"

    |code|

    ^ self.
    self skip:'Unshure, which implementation is correct'.
    
    "/ the following test vector is for another phonem implementation;
    "/ now, I don't know which one is correct...
    
    #(
        ('schneider'    'CNAYDR')
        ('fischer'      'VYCR')
        ('meyer'        'MAYR')
        ('mair'         'MAYR')
        ('schulz'       'CULC')
        ('becker'       'BCR')
        ('hoffmann'     'OVMAN')
        ('schaeffer'    'CVR')
        ('pfeifer'      'VAYVR')
        ('pfeiffer'     'VAYVR')
        
        ('Müller'       'MULR' )
        ('weber'        'BR')
        ('wagner'       'BACNR')
        ('bäker'        'BACR')
        ('schäfer'      'CAVR')
        ('computer'     'COMDUR')
    ) pairsDo:[:word :expectedCode |
        code := (sc phoneticStringsFor:word) first.
        self assert:(code = expectedCode).
    ].

    "Created: / 27-07-2017 / 15:14:59 / cg"
    "Modified: / 31-07-2017 / 17:54:31 / cg"
    "Modified (comment): / 03-08-2017 / 14:57:31 / cg"
! !

!PhonemStringComparatorTest class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
! !