-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclass19.py
More file actions
67 lines (31 loc) · 1.72 KB
/
Copy pathclass19.py
File metadata and controls
67 lines (31 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# myfile = open('input2.txt','a')
# import calendar
# # for i in range(5):
# # myfile.write("I love python.\n")
# # myfile.close()
# myfile.write(calendar.month(2025,2))
# import pandas as pd
# df = pd.read_csv('Attendance.csv')
# import openpyxl
# from openpyxl import load_workbook
# Create an instance of the BanglaDictionary
from bangla_dictionary.dictionary import BanglaDictionary
bd = BanglaDictionary()
# Get the meaning of a word
meaning = bd.get_meaning("অই")
print(meaning) # Output: {"২": ["পদ্যে ছন্দের খাতিরে নির্দেশক স্বরবর্ণ 'ঐ' কখনো কখনো 'অই' রুপে ব্যবহৃত হয়", "স্মরণ সম্বোধন ও আক্ষেপাদি সূচক"], "১": ["অদূরে বা সম্মুখবর্তী কোনো কিছু নির্দেশে ", "নির্দিষ্ট", "উল্লিখিত", "সেই"]}
# Get the pronunciation of a word
pronunciation = bd.get_pronunciation("অংগুষ্ঠানা")
print(pronunciation) # Output: "ওঙ্গুশঠানা"
# Get an example sentence for a word
example = bd.get_example("অকাজ")
print(example) # Output: "সে হলো অকাজের কাজী।"
# Get the part of speech (POS) of a word
pos = bd.get_pos("অকাট্য")
print(pos) # Output: "বিণ"
# Get the type of word
word_type = bd.get_type("অঋণ")
print(word_type) # Output: "অর্থ [অর্থনৈতিক]"
# Get the source of a word
source = bd.get_source("অকাণ্ড")
print(source) # Output: "ব্যবহারিক বাংলা অভিধান"