Skip to content

Is it possible to enforce a space? #42

@unhammer

Description

@unhammer

Almost an inverse of #11, it'd be nice if we could have some way of enforcing a space.

If input is "a, b" (three lexical units) and the rule outputs two units "c b", then separable will notice that there's no space between the first two units, and uses that empty string as the space between the first two output units so we get "cb" instead of "c b".

$ cat b.lsx
<?xml version="1.0" encoding="UTF-8"?>
<dictionary type="separable">
  <alphabet></alphabet>
  <sdefs>
    <sdef n="ex" c="Exasperative"/>
    <sdef n="ir" c="Irritative"/>
 </sdefs>

  <pardefs>
    <pardef n="meh">
      <e><i><w/><t/><j/></i></e>
    </pardef>
  </pardefs>

  <section id="main" type="standard">
    <e>
      <p><l>a<t/><j/></l> <r></r></p>
      <p><l>,<t/><j/></l> <r></r></p>
      <p><l>b<t/><j/></l> <r></r></p>
      <p><l></l>          <r>c<s n="ex"/><j/></r></p>
      <p><l></l>          <r>d<s n="ir"/><j/></r></p>
    </e>
  </section>

</dictionary>


$ lsx-comp lr b.lsx b.bin
main@standard 17 19

$ echo '^a<ir>$^,<cm>$ ^b<ex>$' | lsx-proc b.bin
^c<ex>$^d<ir>$

Expected:

^c<ex>$ ^d<ir>$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions