Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
30
Task/Inverted-index/TUSCRIPT/inverted-index.tu
Normal file
30
Task/Inverted-index/TUSCRIPT/inverted-index.tu
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
$$ MODE TUSCRIPT
|
||||
|
||||
files="file1'file2'file3"
|
||||
LOOP file=files
|
||||
ERROR/STOP CREATE (file,seq-o,-std-)
|
||||
ENDLOOP
|
||||
|
||||
content1="it is what it is"
|
||||
content2="what is it"
|
||||
content3="it is a banana"
|
||||
|
||||
FILE/ERASE "file1" = content1
|
||||
FILE/ERASE "file2" = content2
|
||||
FILE/ERASE "file3" = content3
|
||||
|
||||
ASK "search for": search=""
|
||||
IF (search=="") STOP
|
||||
|
||||
BUILD R_TABLE/USER/AND search = *
|
||||
DATA {search}
|
||||
|
||||
LOOP/CLEAR file=files
|
||||
ACCESS q: READ/RECORDS $file s.z/u,content,count
|
||||
LOOP
|
||||
COUNT/NEXT/EXIT q (-; search;-;-)
|
||||
IF (count!=0) files=APPEND (files," ",file)
|
||||
ENDLOOP
|
||||
ENDACCESs q
|
||||
ENDLOOP
|
||||
PRINT "-> ",files
|
||||
Loading…
Add table
Add a link
Reference in a new issue