Skip to content

Commit

Permalink
Update concessive to use past.a and avoid duplication of patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshtr committed Jun 3, 2018
1 parent a4ba64d commit 8839448
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions vinfl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SUBDIRS = aspects moods

all: tense.a subdirs
tense.a: past.a future.a present.a converb-past.a converb.a concessive.a
concessive.a: past.a
converb.a: converb-past.a

subdirs: $(SUBDIRS)
Expand Down
32 changes: 21 additions & 11 deletions vinfl/concessive.fst
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
#include "../symbols.fst"

% ഉദാഹരണം: പോവുക - പോയാലും, പാടുക - പാടിയാലും , ചാടുക - ചാടിയാലും , തരിക-തന്നാലും
% കരയും - കരഞ്ഞാലും കുളിക്കുക - കുളിച്ചാലും

ALPHABET = [#AAsym#]

%%%% Concessives അനുവാദകങ്ങൾ %%%%%%%%%

% ഉദാഹരണം: പോവുക - പോയാലും, പാടുക - പാടിയാലും , ചാടുക - ചാടിയാലും , തരിക-തന്നാലും
% കരയും - കരഞ്ഞാലും കുളിക്കുക - കുളിച്ചാലും
$past-tense$ = "<past.a>"

$concessive-exceptions$ = {പോകുക}:{പോയാലും}

% We need to wrap the verb into past form first. For that, fake a past tag and pass
% it through the past.a. Only when the input has <concessive> at end.
$fake-past$ = <RB>:<past> ^-> ([<v>] __ [<concessive>])
$remove-past$ = <past>:<RB> ^-> ([<v>] __ [<concessive>])

$verb-suffix-map$ = {ു<infl_marker>}:{ാലും<infl_marker>} | \
{ി<infl_marker>} :{യാലും<infl_marker>}
% The <infl_marker> in above line has no functional effecet. But without that 3 duplicate results
% are generated. 3 is the length of ിയേ. I have not figured out the reason.

$concessive-form$ = $verb-suffix-map$ ^-> ([#Consonants#]+ __ [#BM##TMP#<v><past>]+ <concessive> )
$concessive$ = $fake-past$ || $past-tense$ || $concessive-form$ || $remove-past$

$concessive-forms$ = {വരുക} : {വന്നാലും} | {വരിക} : {വന്നാലും} |\
{തരുക} : {തന്നാലും} | {തരിക} : {തന്നാലും} |\
{രുക}: {ർന്നാലും} | {രുക}: {ർന്നാലും} | \
{യുക}: {ഞ്ഞാലും} | {യുക}: {ഞ്ഞാലും} |\
{യ്ക്കുക} : {ച്ചാലും} | {യ്ക്കുക} : {ച്ചാലും} |\
{ക്കുക} : {ന്നാലും} | {ക്കുക} : {ന്നാലും} |\
{ിക്കുക} : {ിച്ചാലും} | {ിക്കുക} : {ിച്ചാലും}
$concessive-ex$ = $concessive-exceptions$ <>:<infl_marker> ^-> ( __ [#POS##BM##Numbers##TMP#]+ <concessive>)

$concessives$ = $concessive-forms$ <>:<infl_marker> ^-> ([#Letters#]+ __ [#POS##BM##Numbers##TMP#]+ <concessive>)
$concessives$
$concessive-ex$ || $concessive$

0 comments on commit 8839448

Please sign in to comment.