@@ -6,25 +6,10 @@ module.exports = class Notation {
66 // 1:"ခု",
77 tone :{ 1 :"" , 2 :"ဆယ်" , 3 :"ရာ" , 4 :"ထောင်" , 5 :"သောင်း" , 6 :"သိန်း" , 7 :"သန်း" , 8 :"ကုဋေ" } ,
88 creaky :{ 2 :"ဆယ့်" , 3 :"ရာ့" , 4 :"ထောင့်" } ,
9- conjunction :{ space :" " , comma :"၊ " , and :"နှင့်" , plus :"ပေါင်း" , over :"ကျော်" , times :"ကြိမ်" } ,
9+ conjunction :{ space :" " , comma :"၊ " , and :"နှင့်" , plus :"ပေါင်း" , over :"ကျော်" , times :"ကြိမ်" : dot : "ဒဿမ" } ,
1010 task :[ 6 , 7 , 8 ]
1111 }
1212 }
13- configName ( ) {
14- return this . config . name ;
15- }
16- configDigit ( ) {
17- return this . config . digit ;
18- }
19- configTone ( ) {
20- return this . config . tone ;
21- }
22- configCreaky ( ) {
23- return this . config . creaky ;
24- }
25- configConjunction ( ) {
26- return this . config . conjunction ;
27- }
2813 get ( query ) {
2914 let q = Math . floor ( Number ( query . toString ( ) . replace ( / , \s ? / g, "" ) ) ) . toString ( ) , t = 0 ;
3015 if ( isNaN ( q ) ) {
@@ -82,10 +67,10 @@ module.exports = class Notation {
8267 if ( k && Number ( k ) ) {
8368 let ks = ( s * 2 ) - 2 ;
8469 let kr = k . substring ( 0 , ks ) ;
85- let kp = this . requestPrime ( 1 , s ) ;
8670 let k1 = this . requestWrittenTone ( kr , 0 , s - 1 ) ;
8771 let k2 = this . requestCreakyTone ( kr , s - 1 , k1 . length ) ;
8872 if ( k2 ) {
73+ let kp = this . requestPrime ( 1 , s ) ;
8974 rawSense . push ( kp + k1 + ' ' + k2 ) ;
9075 } else {
9176 rawSense . push ( k1 ) ;
@@ -108,21 +93,19 @@ module.exports = class Notation {
10893 examNotation = { test :2 } ;
10994 }
11095 } else {
111- examNotation = { test :3 , raw :raw } ;
11296 ruleExtract = rawCount - 1 + rawEndCount ;
11397 rulePrime = 2 ;
11498 if ( ruleExtract > ruleMax ) {
11599 ruleExtract = rawEndCount - 3 ;
116100 }
101+ examNotation = { test :3 , raw :raw } ;
117102 }
118103 return {
119104 sense :rawSenseName ( ) //, exam: examNotation
120105 } ;
121106 }
122107 requestObject ( str , callback ) {
123108 let strCount = str . length , e = [ ] ;
124- // let testing = this.config.tone.reverse()
125- // let strReverse = str.reverse(); index += to, ++index
126109 for ( let index = 0 ; index < strCount ; ++ index ) {
127110 let position = strCount - index ;
128111 let digit = str [ index ] , next = index + 1 ;
@@ -157,7 +140,7 @@ module.exports = class Notation {
157140 return k . name + k . tone ;
158141 } ) . join ( pair ) ;
159142 }
160- requestCreakyTail ( num , from , to ) {
143+ requestCreakyTail ( num , from , to , pair = ' ' ) {
161144 let str = this . strIntersect ( num , from , to ) ;
162145 return this . requestObject ( str , ( position , next , tone ) => {
163146 if ( str . hasOwnProperty ( next ) && this . config . creaky . hasOwnProperty ( position ) && str [ next ] > 0 ) {
@@ -169,7 +152,7 @@ module.exports = class Notation {
169152 return k . name + k . tone . hasOwnProperty ( 'creaky' ) ?k . name + k . tone . creaky :k . name + k . tone . normal ;
170153 }
171154 return k . name + k . tone . normal ;
172- } ) . join ( ' ' ) ;
155+ } ) . join ( pair ) ;
173156 }
174157 requestDigit ( n ) {
175158 return n . split ( '' ) . map ( k => {
@@ -185,9 +168,8 @@ module.exports = class Notation {
185168 if ( s ) e . push ( '' ) ;
186169 return e . join ( this . config . conjunction . plus + this . config . conjunction . space ) ;
187170 }
188- createString ( n ) {
189- // return n.filter(function(e){return e}).join(this.config.conjunction.and+this.config.conjunction.space)
190- let a = n . filter ( function ( e ) { return e } ) ;
171+ createString ( a ) {
172+ // let a= n.filter(function(e){return e});
191173 if ( a . length > 1 ) {
192174 return a . slice ( 0 , - 1 ) . join ( this . config . conjunction . comma ) + this . config . conjunction . and + this . config . conjunction . space + a . slice ( - 1 ) ;
193175 } else {
0 commit comments