Rev 13631 | Blame | Compare with Previous | Last modification | View Log | RSS feed
!! should create an option in translator : for the moment, if a group of
!! words is not found, the words are searched. I would like not.
!! sout=!exec translator $srch
Sout=
!if $search_level!=$empty
Soutlevel=
slcnt=!itemcnt $search_level
!for s_ = 1 to $slcnt
sout_=!lookup $(search_level[$s_]) in wimshome/public_html/$dictionary
sout_=!words2items $sout_
Soutlevel=!append item $sout_ to $Soutlevel
!next
Soutlevel=!listuniq $Soutlevel
!endif
!if $search_and=yes
srch1=!replace internal ,$ $ by , in $srch
srch1=!items2lines $srch1
scnt=!linecnt $srch1
!for s_ = 1 to $scnt
sout_=!lookup $(srch1[$s_;]) in wimshome/public_html/$dictionary
sout_=!words2items $sout_
sout_=!replace internal ?4 by ?2 in $sout_
!if $s_ >1
Sout=!listintersection $Sout and $sout_
!else
Sout=$sout_
!endif
!next
sout=$Sout
!if $search_level!=$empty
sout=!listintersection $Sout and $Soutlevel
!endif
!else
scnt=!itemcnt $srch
!for s_ = 1 to $scnt
sout_=!lookup $(srch[$s_]) in wimshome/public_html/$dictionary
sout_=!words2items $sout_
Sout=!append item $sout_ to $Sout
!next
sout=!listuniq $Sout
!if $search_level!=$empty
sout=!replace internal ?4 by ?2 in $sout
sout=!listintersection $sout and $Soutlevel
!endif
!endif
sout=!items2words $sout
sout=!words2lines $sout
sout=!translate ? to $ $ in $sout
sout=!sort lines $sout
sout=!nonempty lines $sout
scnt=!linecnt $sout
!if $scnt > $gotlim2
warning=!append item $[$scnt-$gotlim2] to $warning
!endif