File: atext

package info (click to toggle)
wims 2%3A4.30%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 185,332 kB
  • sloc: xml: 366,687; javascript: 120,570; java: 62,170; ansic: 61,221; sh: 7,747; perl: 3,939; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (66 lines) | stat: -rw-r--r-- 1,480 bytes parent folder | download | duplicates (4)
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
option: symbols=" "
good=!singlespace $(replygood$i)
good=!rows2lines $good
good=!nonempty lines $good
badwords=!line 2 to -1 of $good
good=!line 1 of $good
replyGood$i=!translate | to $\
$ in $good
replyGood$i=!nonempty lines $(replyGood$i)
replyGood$i=!line 1 of $(replyGood$i)
badwords=!translate internal |[]{*} to $       $ in $badwords
dd=!translate internal |[]{*} to $       $ in $(reply$i)

good=!replace internal | by $ | $ in $good
good=!translate internal []{*} to $      $ in $good

suffix_dictionary=bases/sys/suffix.$module_language
dictionary=scripts/oef/$module_language/atext.dic
!for d in good,badwords,dd
  dv=!deaccent $($d)
  dv=!lower $dv
  dv=!translate internal -+/*='"`.;,!@#$$%^&()?<>\~ to\
		$                                       $ in $dv
  dv=!replace | by $ | $ in $dv
  translator_unknown=leave
  dv=!exec translator $dv
  dv=!singlespace $dv
  dv=!trim $dv
  $d=!text select $ |[]{}*abcdefghijklmnopqrstuvwxyz0123456789 in $dv
!next d

m_reply$i=$dd
!if $wims_read_parm=nocompare
  !exit
!endif

!if $good=$empty
  Test=bad $i
  !exit
!endif

diag=
good=!translate | to , in $good
good=!nonempty items $good
!for g in $good
  !if $dd=$g
    diag=yes
  !endif
!next g

!if $diag=yes
  diareply$i=good
  !advance freegot
!else
  bn=!wordcnt $badwords
  !if $bn>0
    dt=!words2items $dd
    !for w in $dt
      !if $w notwordof $good $badwords
        test=NaN unknownword $w
        !exit
      !endif
    !next w
  !endif
  diareply$i=bad
!endif