Sandbox
From Metabolomics.JP
(Difference between revisions)
Line 4: | Line 4: | ||
local H = {}; | local H = {}; | ||
local I = {}; | local I = {}; | ||
− | for id, name in stdin:gmatch("&&(%w+).Common Name=&&(%S+)") do | + | for id, name in stdin:gmatch("&&(%w+).Common Name=&&([%S ]+)") do |
name = string.lower(name); | name = string.lower(name); | ||
for term in string.gmatch(name,"(%w+)") do | for term in string.gmatch(name,"(%w+)") do | ||
− | if ((string.len(term) | + | if ((string.len(term) < 5)) then |
if (H[term] == nil) then | if (H[term] == nil) then | ||
− | + | table.insert(I, term); | |
− | + | -- else | |
− | + | -- H[term] = H[term] .. ";" .. id; | |
end | end | ||
+ | H[term] = id; | ||
end | end | ||
end | end |
Revision as of 03:46, 2 October 2008
this is sandbox page.