with python how to check alomost similar words

Str1 = "The supreme court case of Nixon vs The United States"
Str2 = "Nixon v. United States"
Ratio = fuzz.ratio(Str1.lower(),Str2.lower())
Partial_Ratio = fuzz.partial_ratio(Str1.lower(),Str2.lower())
Token_Sort_Ratio = fuzz.token_sort_ratio(Str1,Str2)
Token_Set_Ratio = fuzz.token_set_ratio(Str1,Str2)
print(Ratio)
print(Partial_Ratio)
print(Token_Sort_Ratio)
print(Token_Set_Ratio)

Here is what the above code is Doing:
1. We are using the fuzz module from the fuzzywuzzy library.
2. We are using the ratio function to calculate the ratio of similarity between the two strings.
3. We are using the partial_ratio function to calculate the partial ratio of similarity between the two strings.
4. We are using the token_sort_ratio function to calculate the token sort ratio of similarity between the two strings.
5. We are using the token_set_ratio function to calculate the token set ratio of similarity between the two strings.