Step 1. Check whether the sentence is Complex sentence or Simple Sentence |
Initialize. Set ICOUNT = 1, NCOUNT = 1, CCOUNT = 1, ILOC, NLOC, CLOC. |
Repeat for LOC = 1 to : |
if SENTENCELOC = “Interrogative word”, then: |
Set ILOCICOUNT LOC, |
ICOUNT = ICOUNT + 1. |
End of if structure |
if SENTENCELOC = “Negative word”, then: |
Set NLOCNCOUNT LOC, |
NCOUNT= NCOUNT + 1. |
End of if structure |
if SENTENCELOC = “Conjunction”, then: |
Set CLOCCCOUNT LOC. |
CCOUNT = CCOUNT + 1 |
End of if structure |
End of for |
if ILOC = NULL, or NLOC = NULL, or CLOC = NULL, then: |
Go to Step 5. |
Step 2. Remove the interrogative word from the complex sentence to make it Affirmative. |
Repeat for = 1 to ICOUNT |
Set ITemp:= SENTENCEILOC. |
Set SENTENCEILOC:= Null. |
End of for |
Step 3. Then Remove the negative to make it simple sentence |
Repeat for = 1 to NCOUNT |
Set NTemp:= SENTENCENLOC. |
Set SENTENCENLOC:= Null. |
End of for |
Step 4. Split the sentence into two or more simple sentences on the basis of conjunction. |
Repeat for = 1 to CCOUNT |
Set CTemp:= SENTENCECLOC. |
Set SENTENCECLOC:= Hindi Full-stop (“∣”). |
End of for |
Step 5. Pass each sub sentence with TOKEN to QNN based Machine Translator for reposition. |
Step 6. Refine the Translated sentences by applying the grammar rules. |
Step 7. Add the interrogative word if removed in Step 2. |
Repeat for = 1 to ICOUNT |
if ITEMP = NOT NULL |
Set SENTENCEILOC:= ITemp. |
End of if structure |
End of for |
Step 8. Add the negative word if removed in Step 3. |
Repeat for = 1 to NCOUNT |
if NTEMP = NOT NULL |
Set SENTENCENLOC:= NTemp. |
End of if structure |
End of for |
Step 9. Rejoin the entire sub sentences, if split in Step 4. |
Step 10. Semantic Translation |
Step 11. Exit. |