JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
avoid "alternative spelling of ..." definitions
authorJason Woofenden <jason@jasonwoof.com>
Sun, 13 Oct 2013 03:26:46 +0000 (23:26 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Sun, 13 Oct 2013 03:26:46 +0000 (23:26 -0400)
main.coffee

index 7403503..a03fa73 100644 (file)
@@ -526,8 +526,8 @@ extract_wiktionary_definiton = (html) ->
                if part and el.tagName is 'OL'
                        $(el).children().each (i, el) ->
                                new_def = $(el).text()
-                               if new_def.substr(0, 9) is '(obsolete' or new_def.substr(0, 8) is "(archaic" or new_def.substr(0, 20) is "Alternative form of "
-                                       key = 'obsolete'
+                               if new_def.substr(0, 9) is '(obsolete' or new_def.substr(0, 8) is "(archaic" or new_def.substr(0, 20) is "Alternative form of " or new_def.substr(0, 24) is "Alternative spelling of "
+                                       key = 'lame'
                                else
                                        if part is 'verb'
                                                key = 'verb'
@@ -541,7 +541,7 @@ extract_wiktionary_definiton = (html) ->
                        if found.verb
                                return false # break
 
-       part_defs = (finds[i] for i in ['verb', 'nonverb', 'obsolete'] when finds[i])
+       part_defs = (finds[i] for i in ['verb', 'nonverb', 'lame'] when finds[i])
        unless part_defs.length
                return false