Subversion Repositories wimsdev

Rev

Rev 11407 | Rev 13631 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7069 bpr 1
!! should create an option in translator : for the moment, if a group of
6516 bpr 2
!! words is not found, the words are searched. I would like not.
3
!! sout=!exec translator $srch
6739 bpr 4
 
5
Sout=
11379 bpr 6
!if $search_level!=$empty
7
  Soutlevel=
8
  slcnt=!itemcnt $search_level
9
  !for s_ = 1 to $slcnt
10
      sout_=!lookup $(search_level[$s_]) in wimshome/public_html/$dictionary
11
      sout_=!words2items $sout_
12
      Soutlevel=!append item $sout_ to $Soutlevel
13
  !next
12083 bpr 14
  Soutlevel=!listuniq $Soutlevel
11379 bpr 15
!endif
16
!if $search_and=yes
6739 bpr 17
   srch1=!replace internal ,$ $ by , in $srch
18
   srch1=!items2lines $srch1
19
   scnt=!linecnt $srch1
6516 bpr 20
   !for s_ = 1 to $scnt
6739 bpr 21
     sout_=!lookup $(srch1[$s_;]) in wimshome/public_html/$dictionary
6516 bpr 22
     sout_=!words2items $sout_
7069 bpr 23
     sout_=!replace internal ?4 by ?2 in $sout_
7046 bpr 24
     !if $s_ >1
6516 bpr 25
       Sout=!listintersection $Sout and $sout_
26
     !else
27
       Sout=$sout_
28
     !endif
29
   !next
30
   sout=$Sout
11379 bpr 31
   !if $search_level!=$empty
32
     sout=!listintersection $Sout and $Soutlevel
33
   !endif
6516 bpr 34
 !else
35
    scnt=!itemcnt $srch
36
    !for s_ = 1 to $scnt
37
      sout_=!lookup $(srch[$s_]) in wimshome/public_html/$dictionary
38
      sout_=!words2items $sout_
39
      Sout=!append item $sout_ to $Sout
40
    !next
41
    sout=!listuniq $Sout
11379 bpr 42
    !if $search_level!=$empty
11407 bpr 43
      sout=!replace internal ?4 by ?2 in $sout
11379 bpr 44
      sout=!listintersection $sout and $Soutlevel
45
    !endif
6516 bpr 46
 !endif
47
 sout=!items2words $sout
48
 sout=!words2lines $sout
49
 sout=!translate ? to $ $ in $sout
50
 sout=!sort lines $sout
51
 sout=!nonempty lines $sout
52
 scnt=!linecnt $sout
7069 bpr 53
 
7044 bpr 54
 !if $scnt > $gotlim2
55
   warning=!append item $[$scnt-$gotlim2] to $warning
56
!endif