テキストから生成された語形のリストがあります。このリストには固有名詞が含まれています (例: John、Mary、Edinburgh)。別のフィールドには、固有名詞のリストがあります。適切な名前のないすべての単語形式のリストを取得したい。
私は実際に必要です
allWordForms MINUS properNames
配列はセットのように使用できます。Union
しかし、集合演算としかありませんIntersect
。
ここまでの脚本
on mouseUp
put field "allWordForms" into tWordForms
split tWordForms by return
-- tWordForms is now an array
put field "properNames" into tProperNames
split tProperNames by return
-- tProperNames is now an array
-- .....
repeat
-- .....
-- .....
end repeat
combine tWordForms using return
put tWordForms into field "wordFormsWithoutProperNames"
end mouseUp
繰り返しループはどのように見えますか?
そして、ここに例があります。
フィールド「allWordForms」には次が含まれます
Mary
and
John
came
yesterday
They
want
to
move
from
Maryland
to
Petersbourough
`
フィールド「properNames」には次が含まれます
John
Mary
Maryland
Peter
Petersbourough
望ましい結果はallWordForms
、適切な名前が削除されたリストのコピーを持つことです。
and
came
yesterday
They
want
to
move
from
to