Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-118
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-118
2023-118
Commits
53b1e8a4
Commit
53b1e8a4
authored
Sep 03, 2023
by
S.T. Galappaththi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'IT20167264' into 'master'
It20167264 See merge request
!103
parents
2e2e9eff
9f9bf2f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
34 deletions
+3
-34
sinlingua/grammar_rule/rule_based_4.py
sinlingua/grammar_rule/rule_based_4.py
+1
-13
sinlingua/grammar_rule/rule_based_past_2.py
sinlingua/grammar_rule/rule_based_past_2.py
+2
-13
sinlingua/grammar_rule/rule_based_past_3.py
sinlingua/grammar_rule/rule_based_past_3.py
+0
-8
No files found.
sinlingua/grammar_rule/rule_based_4.py
View file @
53b1e8a4
...
...
@@ -14,19 +14,7 @@ class FourthPerson(GrammarRules):
actual_word
=
returned_string_verb
[
1
]
ratio
=
returned_string_verb
[
2
]
if
returned_string_verb
[
0
]:
if
verb_checked
==
'ගන්නවා'
:
verb_checked
=
'ගනිනවා'
elif
verb_checked
==
'පෙන්නනනවා'
:
verb_checked
=
'පෙන්වනවා'
elif
verb_checked
==
'ගන්නනනවා'
:
verb_checked
=
'ගන්වනවා'
elif
verb_checked
==
'නිදාගන්නවා'
:
verb_checked
=
'නිදාගනිනවා'
elif
verb_checked
==
'ඉන්නවා'
:
verb_checked
=
'ඉන්නෙනවා'
elif
verb_checked
==
'ආදරෙයි'
:
verb_checked
=
'ආදරය කරනවා'
# Extract the verb stem
# Extract the verb stem
verb_stem
=
verb_checked
[:
-
1
]
# Remove the last word (verb) from the sentence
words
=
sentence
.
split
()
...
...
sinlingua/grammar_rule/rule_based_past_2.py
View file @
53b1e8a4
...
...
@@ -16,19 +16,8 @@ class PastSecondPersonSingular(GrammarRules):
actual_word
=
returned_string_verb
[
1
]
ratio
=
returned_string_verb
[
2
]
if
returned_string_verb
[
0
]:
if
verb_checked
==
'ගන්නවා'
:
verb_checked
=
'ගනිනවා'
elif
verb_checked
==
'පෙන්නනනවා'
:
verb_checked
=
'පෙන්වනවා'
elif
verb_checked
==
'ගන්නනනවා'
:
verb_checked
=
'ගන්වනවා'
elif
verb_checked
==
'නිදාගන්නවා'
:
verb_checked
=
'නිදාගනිනවා'
# Extract the verb stem
#verb_stem = verb_checked[:-2]
#
verb_stem = verb_checked[:-2]
# Remove the last word (verb) from the sentence
words
=
sentence
.
split
()
words
.
remove
(
actual_word
)
...
...
@@ -36,7 +25,7 @@ class PastSecondPersonSingular(GrammarRules):
if
sentence
.
split
()[
0
]
in
[
"ඇය"
,
"ඈ"
]
or
(
len
(
sentence
.
split
())
>
1
and
sentence
.
split
()[
1
]
in
[
"ඇය"
,
"ඈ"
]):
if
len
(
words
)
>
1
and
words
[
1
]
in
[
"ඇය"
,
"ඈ"
]:
words
.
pop
(
0
)
#verb_stem = verb_checked[:-2]
#
verb_stem = verb_checked[:-2]
conjugated_verb
=
verb_checked
+
"ය"
# Add the first word as "ඇය" to the sentence
words
[
0
]
=
"ඇය"
...
...
sinlingua/grammar_rule/rule_based_past_3.py
View file @
53b1e8a4
...
...
@@ -13,14 +13,6 @@ class PastSecondPersonPlural(GrammarRules):
actual_word
=
returned_string_verb
[
1
]
ratio
=
returned_string_verb
[
2
]
if
returned_string_verb
[
0
]:
if
verb_checked
==
'ගන්නවා'
:
verb_checked
=
'ගනිනවා'
elif
verb_checked
==
'පෙන්නනනවා'
:
verb_checked
=
'පෙන්වනවා'
elif
verb_checked
==
'ගන්නනනවා'
:
verb_checked
=
'ගන්වනවා'
elif
verb_checked
==
'නිදාගන්නවා'
:
verb_checked
=
'නිදාගනිනවා'
# Extract the verb stem
verb_stem
=
verb_checked
[:
-
1
]
# Remove the last word (verb) from the sentence
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment