Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sagorbrur committed Dec 28, 2019
1 parent da2e89f commit df7b648
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ from bnlm.bnlm import BengaliTokenizer
from bnlm.bnlm import get_sentence_similarity
model_path = 'model'
sp_model = "model/bn_spm.model"
sentence_1 = "আমি ভাত খাই"
sentence_2 = "আমি ভাত খাই"
sentence_1 = "সে খুব করে কথা বলে"
sentence_2 = "তার কথা খুবেই মিষ্টি"
sim = get_sentence_similarity(sentence_1, sentence_2, model_path, sp_model)
print("similarity is: ", sim)

# Output: 0.717997670173645

```

## Get Simillar Sentences
Expand All @@ -98,10 +100,10 @@ from bnlm.bnlm import get_similar_sentences
model_path = 'model'
sp_model = "model/bn_spm.model"

input_sentence = "আমি ভাত খাই"
input_sentence = "আমি বাংলায় গান গাই"
sen_pred = get_similar_sentences(input_sentence, 3, model_path, sp_model)
print(sen_pred)

# output: ['আমি বাংলায় গান গাই ।', 'আমি ইংরেজিতে গান গাই।', 'আমি বাংলায় গানও গাই।']

```

Expand Down

0 comments on commit df7b648

Please sign in to comment.