Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Documented substring matching

  • Loading branch information...
commit 7f7ec7707fecae5e803a7940fdf0c15f992b70cd 1 parent 22d1a46
@gaye gaye authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 RapMatcher.py
View
4 RapMatcher.py
@@ -30,6 +30,10 @@ def __equality_match(self, word1, word2):
return word1 == word2
def __substring_match(self, word1, word2):
+ """
+ Tests whether either word has length greater than 3
+ and is a substring of the other word
+ """
return (((len(word1) > 3) and (word1 in word2)) or
((len(word2) > 3) and (word2 in word1)))
Please sign in to comment.
Something went wrong with that request. Please try again.