Skip to main content
added 93 characters in body
Source Link
bigyihsuan
  • 11.5k
  • 1
  • 31
  • 72

Lexurgy, 288 286286 281 bytes

  • -2 bytes: remove the u and w classes and replace them with one-time substitutions.
  • -5: fix a bug with the example case, combine some rules into a single step
Class v {a,e,i,o,u}
Class c {@up,@wt,k,f,s,c,b,d,g,v,z,g,h,j,l,m,n,q,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v, @c}* _
d:
* {b,d,g,v,z,g}$1=>$1 {p,t,k,f,s,c,x}/_ ;
* ,{pb,td,kg,fv,sz,cg,x}}$1=>$1 {{b,d,g,v,z,g,x},{p,t,k,f,s,c,x}}/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
g:
;=>*

Lexurgy, 288 286 bytes

  • -2 bytes: remove the u and w classes and replace them with one-time substitutions.
Class v {a,e,i,o,u}
Class c {@u,@w,h,j,l,m,n,q,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v, @c}* _
d:
* {b,d,g,v,z,g}$1=>$1 {p,t,k,f,s,c}/_ ;
* {p,t,k,f,s,c}$1=>$1 {b,d,g,v,z,g}/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
g:
;=>*

Lexurgy, 288 286 281 bytes

  • -2: remove the u and w classes and replace them with one-time substitutions.
  • -5: fix a bug with the example case, combine some rules into a single step
Class v {a,e,i,o,u}
Class c {p,t,k,f,s,c,b,d,g,v,z,g,h,j,l,m,n,q,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v,@c}* _
* {{p,t,k,f,s,c,x},{b,d,g,v,z,g,x}}$1=>$1 {{b,d,g,v,z,g,x},{p,t,k,f,s,c,x}}/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
;=>*
deleted 401 characters in body
Source Link
bigyihsuan
  • 11.5k
  • 1
  • 31
  • 72

Lexurgy, 288288 286 bytes

Lexurgy is an online tool meant for conlangers (people who make constructed languages) to apply sound changes to their conlangs via a series of programmable rules. As such, this tool involves many string operations.

Place input in the left box, code in the center, and click "Apply" to view the output in the right box.

(Note: Lexurgy is a programming language according to our definition of a programming language, since Lexurgy's provided examples shows a functional adding machine implemented in Lexurgy. Theoretically, one could take a unary primality test and implement it in Lexurgy as well.)

  • -2 bytes: remove the u and w classes and replace them with one-time substitutions.
Class v {a,e,i,o,u}
Class u {p,t,k,f,s,c}
Class w {b,d,g,v,z,g}
Class c {@u,@w,h,j,l,m,n,q,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v, @c}* _
d:
* @w$1=>$1{b,d,g,v,z,g}$1=>$1 @u{p,t,k,f,s,c}/_ ;
* @u$1=>$1{p,t,k,f,s,c}$1=>$1 @w{b,d,g,v,z,g}/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
g:
;=>*

Lexurgy, 288 bytes

Lexurgy is an online tool meant for conlangers (people who make constructed languages) to apply sound changes to their conlangs via a series of programmable rules. As such, this tool involves many string operations.

Place input in the left box, code in the center, and click "Apply" to view the output in the right box.

(Note: Lexurgy is a programming language according to our definition of a programming language, since Lexurgy's provided examples shows a functional adding machine implemented in Lexurgy. Theoretically, one could take a unary primality test and implement it in Lexurgy as well.)

Class v {a,e,i,o,u}
Class u {p,t,k,f,s,c}
Class w {b,d,g,v,z,g}
Class c {@u,@w,h,j,l,m,n,q,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v, @c}* _
d:
* @w$1=>$1 @u/_ ;
* @u$1=>$1 @w/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
g:
;=>*

Lexurgy, 288 286 bytes

Lexurgy is an online tool meant for conlangers (people who make constructed languages) to apply sound changes to their conlangs via a series of programmable rules. As such, this tool involves many string operations.

  • -2 bytes: remove the u and w classes and replace them with one-time substitutions.
Class v {a,e,i,o,u}
Class c {@u,@w,h,j,l,m,n,q,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v, @c}* _
d:
* {b,d,g,v,z,g}$1=>$1 {p,t,k,f,s,c}/_ ;
* {p,t,k,f,s,c}$1=>$1 {b,d,g,v,z,g}/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
g:
;=>*
added 4 characters in body
Source Link
bigyihsuan
  • 11.5k
  • 1
  • 31
  • 72

Lexurgy, 282288 bytes

Class v {a,e,i,o,u}
Class u {p,t,k,f,s,c}
Class w {b,d,g,v,z,g}
Class c {@u,@w,h,j,l,m,n,lq,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v, @c}* _
d:
* @w$1=>$1 @u/_ ;
* @u$1=>$1 @w/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
g:
;=>*
Class consonant {p,b,t,d,k,g,f,v,s,z,x,j,l,r,m,n,c,w}
Class vowel {a,e,i,o,u}
 
Class unvoiced {p,t,k,f,s,c}
Class voiced {b,d,g,v,z,g}
Class consonant {@unvoiced,@voiced,h,j,l,m,n,q,r,w,x}

# find first consonant after first vowel
part-1:
 @consonant * => @consonant ; / $ @consonant* @vowel* _ // {$ _, $ @consonant _}

romanizer-a:
 unchanged

# delete the consonant after the seperator
part-2:
 @consonant => * / ; _

romanizer-b:
 unchanged

# remove everything except the second vowel
part-3:
 {@vowel, @consonant} => * / ; @vowel {@vowel, @consonant}* _

romanizer-c:
 unchanged

# voicings
part-4:
 * @voiced$1 => $1 @unvoiced / _ ;
 * @unvoiced$1 => $1 @voiced / _ ;

romanizer-d:
 unchanged

# swap mapped consonant and seperator
part-5:
 @consonant$1 ; => ; $1

romanizer-e:
 unchanged

# duplicate the `fe`
part-6:
 (@consonant @vowel)$1 => $1 $1 / ; _

romanizer-f:
 unchanged

# remove the seperator
part-7:
 ; => *

Lexurgy, 282 bytes

Class v {a,e,i,o,u}
Class u {p,t,k,f,s,c}
Class w {b,d,g,v,z,g}
Class c {@u,@w,m,n,l,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v, @c}* _
d:
* @w$1=>$1 @u/_ ;
* @u$1=>$1 @w/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
g:
;=>*
Class consonant {p,b,t,d,k,g,f,v,s,z,x,j,l,r,m,n,c,w}
Class vowel {a,e,i,o,u}
 
Class unvoiced {p,t,k,f,s,c}
Class voiced {b,d,g,v,z,g}

# find first consonant after first vowel
part-1:
 @consonant * => @consonant ; / $ @consonant* @vowel* _ // {$ _, $ @consonant _}

romanizer-a:
 unchanged

# delete the consonant after the seperator
part-2:
 @consonant => * / ; _

romanizer-b:
 unchanged

# remove everything except the second vowel
part-3:
 {@vowel, @consonant} => * / ; @vowel {@vowel, @consonant}* _

romanizer-c:
 unchanged

# voicings
part-4:
 * @voiced$1 => $1 @unvoiced / _ ;
 * @unvoiced$1 => $1 @voiced / _ ;

romanizer-d:
 unchanged

# swap mapped consonant and seperator
part-5:
 @consonant$1 ; => ; $1

romanizer-e:
 unchanged

# duplicate the `fe`
part-6:
 (@consonant @vowel)$1 => $1 $1 / ; _

romanizer-f:
 unchanged

# remove the seperator
part-7:
 ; => *

Lexurgy, 288 bytes

Class v {a,e,i,o,u}
Class u {p,t,k,f,s,c}
Class w {b,d,g,v,z,g}
Class c {@u,@w,h,j,l,m,n,q,r,w,x}
a:
@c *=>@c ;/$ @c* @v* _//{$ _,$ @c _}
b:
@c=>* /; _
c:
{@v,@c}=>* /; @v {@v, @c}* _
d:
* @w$1=>$1 @u/_ ;
* @u$1=>$1 @w/_ ;
e:
@c$1 ;=>; $1
f:
(@c @v)$1=>$1 $1/; _
g:
;=>*
Class vowel {a,e,i,o,u}
Class unvoiced {p,t,k,f,s,c}
Class voiced {b,d,g,v,z,g}
Class consonant {@unvoiced,@voiced,h,j,l,m,n,q,r,w,x}

# find first consonant after first vowel
part-1:
 @consonant * => @consonant ; / $ @consonant* @vowel* _ // {$ _, $ @consonant _}

romanizer-a:
 unchanged

# delete the consonant after the seperator
part-2:
 @consonant => * / ; _

romanizer-b:
 unchanged

# remove everything except the second vowel
part-3:
 {@vowel, @consonant} => * / ; @vowel {@vowel, @consonant}* _

romanizer-c:
 unchanged

# voicings
part-4:
 * @voiced$1 => $1 @unvoiced / _ ;
 * @unvoiced$1 => $1 @voiced / _ ;

romanizer-d:
 unchanged

# swap mapped consonant and seperator
part-5:
 @consonant$1 ; => ; $1

romanizer-e:
 unchanged

# duplicate the `fe`
part-6:
 (@consonant @vowel)$1 => $1 $1 / ; _

romanizer-f:
 unchanged

# remove the seperator
part-7:
 ; => *
deleted 18 characters in body
Source Link
bigyihsuan
  • 11.5k
  • 1
  • 31
  • 72
Loading
Source Link
bigyihsuan
  • 11.5k
  • 1
  • 31
  • 72
Loading