This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .SILENT: | |
| docs: ~/tmp/lua7a.html | |
| locs: | |
| cat lua7a.lua \ | |
| | gawk '/^function/ { fun=NR } \ | |
| fun && /^[ \t]*$$/ { print NR-fun; fun=0 }' \ | |
| | sort -n | fmt -20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def stem(w): | |
| vowels = "aeiou" | |
| # Plural normalization | |
| if w.endswith("ies") and len(w) > 4: | |
| return w[:-3] + "y" | |
| if w.endswith("ves") and len(w) > 4: | |
| return w[:-3] + "f" | |
| # Long suffixes (Porter-inspired) |
NewerOlder




