This file is indexed.

/usr/share/festival/dicts/upc/upclex_syl.scm is in festival-ca 3.0.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Lexicon, LTS and Postlexical rules for upc_catalan
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Adapted for Catalan by the UPC team
;;;
;;; (c) Antonio Bonafonte
;;;     Universitat Politècnica de Catalunya, Barcelona, Spain
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Syllabification Test
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define (upc_ca_test_syl file)
  (let ((fd (fopen file "r")) (w 0) (c 0) (entry) (wordlex) (wordlts))
    (while (not (equal? (set! entry (readfp fd)) (eof-val)))
	   (set! w (+ w 1))
	   (set! wordlex (car (cdr (cdr (lex.lookup entry)))))
	   (set! wordlts (car (cdr (catala_trans entry))))
	   (if (equal? (upc_ca_compare_syl wordlex wordlts) 0)
	       (format t "PARAULA ERRÒNIA: %s LEX: %l LTS: %l\n" entry wordlex wordlts)
	       (set! c (+ c 1)))   
	   )

    (format t "PARAULES TOTALS: %d ENCERTS %d (%2.2f)\n" w  c (/ (* c 100) w))
    (fclose fd)
    ))


(define (upc_ca_test_nolts_syl filelts filewords)
  (let ((fd (fopen filewords "r")) (fs (fopen filelts "r")) (w 0) (c 0) (entry) (wordlex) (wordlts))
    (while (not (equal? (set! entry_word (readfp fd)) (eof-val)))
	   (set! entry_phones (readfp fs))
	   (set! w (+ w 1))
	   (set! wordlex (car (cdr (cdr (lex.lookup entry_word)))))
	   (set! wordlts (car (cdr (catala_trans2 entry_word entry_phones))))
	   (if (equal? (upc_ca_compare_syl wordlex wordlts) 0)
	       (format t "PARAULA ERRÒNIA: %s LEX: %l LTS: %l\n" entry_word wordlex wordlts)
	       (set! c (+ c 1)))   
	   )

    (format t "PARAULES TOTALS: %d ENCERTS %d (%2.2f)\n" w  c (/ (* c 100) w))
    (fclose fd)
    (fclose fs)
    ))

(define (upc_ca_test_auto_syl filelts filewords)
  (let ((fd (fopen filewords "r")) (fs (fopen filelts "r")) (w 0) (c 0) (entry) (wordlex) (wordlts))
    (while (not (equal? (set! entry_word (readfp fd)) (eof-val)))
	   (set! entry_phones (readfp fs))
	   (set! w (+ w 1))
	   (set! wordlex (car (cdr (cdr (lex.lookup entry_word)))))
	   (set! wordlts (car (cdr (catala_trans3_festival entry_word entry_phones))))
	   (if (equal? (upc_ca_compare_syl wordlex wordlts) 0)
	       (format t "PARAULA ERRÒNIA: %s LEX: %l LTS: %l\n" entry_word wordlex wordlts)
	       (set! c (+ c 1)))   
	   )

    (format t "TEST AMB SIL·LABIFICACIÓ AUTOMÀTICA \n PARAULES TOTALS: %d ENCERTS %d (%2.2f)\n" w  c (/ (* c 100) w))
    (fclose fd)
    (fclose fs)
    ))

(define (upc_ca_test_auto_syl_with_lts file)
  (let ((fd (fopen file "r")) (w 0) (c 0) (entry) (wordlex) (wordlts))
    (while (not (equal? (set! entry (readfp fd)) (eof-val)))
	   (set! w (+ w 1))
	   (set! wordlex (car (cdr (cdr (lex.lookup entry)))))
	   (set! wordlts (car (cdr (catala_trans4 entry))))
	   (if (equal? (upc_ca_compare_syl wordlex wordlts) 0)
	       (format t "PARAULA ERRÒNIA: %s LEX: %l LTS: %l\n" entry wordlex wordlts)
	       (set! c (+ c 1)))   
	   )

    (format t "TEST AMB SIL·LABIFICACIÓ AUTOMÀTICA I APLICANT LTS \n PARAULES TOTALS: %d ENCERTS %d (%2.2f)\n" w  c (/ (* c 100) w))
    (fclose fd)
    ))


(define (count_items lista)
  (let ((i 20))
    (while (equal? (nth i lista) nil)
	   (set! i (- i 1)))
    (set! i (+ i 1))
    i)) 

(define (upc_ca_compare_syl wordlex wordlts)
  (cond
   ((equal? (count_items wordlex) (count_items wordlts))
    (set! num (count_items wordlex))
    (set! equal 1)
    (set! num (- num 1))
    (while (equal? num -1)
	   (set! syla (car (nth num wordlex)))
	   (set! sylb (car (nth num wordlts)))
	   (if (not (equal? (count_items syla) (count_items sylb)))
	       (set! equal 0))
	   (set! num (- num 1)))
    equal)
   (t 
    0)))

(define (upc_catalan_add_ruleset_correct_LTS)
"(upc_catalan_add_ruleset_correct_LTS)
Loads into the current lexicon a ruleset.
I believe it may be used in syllabification, or maybe is just obsolete code."
(lts.ruleset
 upc_ca_correct_LTS
 ( )
 (

  ( E1 [ j ] ax = j )
  ( ax [ j ] E1 = j ) 
  ( ax [ j ] e1 = j )
  ( u1 [ j ] ax = j )
  ( [ j ] = i )

  ( [ b ] = b )
  ( [ z ] = z )
  ( [ d ] = d )
  ( [ f ] = f )
  ( [ g ] = g )
  ( [ S ] = S )
  ( [ k ] = k )
  ( [ l ] = l )
  ( [ Z ] = Z )
  ( [ m ] = m )
  ( [ n ] = n )
  ( [ J ] = J )
  ( [ p ] = p )
  ( [ r ] = r )
  ( [ rr ] = rr )
  ( [ s ] = s )
  ( [ t ] = t )
  ( [ L ] = L )
  ( [ j ] = j )
  ( [ w ] = w )
  ( [ j ] = j )

  ( [ a1  ] = a1  )
  ( [ a   ] = a   )
  ( [ E1  ] = E1  )
  ( [ E   ] = E   )
  ( [ e1  ] = e1  )
  ( [ e   ] = e   )
  ( [ i1  ] = i1  )
  ( [ i  ] = i  )
  ( [ O1  ] = O1  )
  ( [ O   ] = O   )
  ( [ o1  ] = o1  )
  ( [ o   ] = o   )
  ( [ u1  ] = u1  )
  ( [ u   ] = u   )
  ( [ ax  ] = ax  )
  ))

)

(provide 'upclex_syl)