Mistake assert tips in FST builder ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mistake assert tips in FST builder ?

zhenyuan wei
Hi,
   With current newest version, 9.0.0-snapshot,In
Builder.UnCompileNode.addArc() function,
found this line:

assert numArcs == 0 || label > arcs[numArcs-1].label: "arc[-1].label="
+ arcs[numArcs-1].label + " new label=" + label + " numArcs=" +
numArcs;

Maybe assert tips is :

assert numArcs == 0 || label > arcs[numArcs-1].label:
"arc[numArc-1].label=" + arcs[numArcs-1].label + " new label=" + label
+ " numArcs=" + numArcs;

Is it a personal tips code style? or small mistake?

Just curious about it.
Reply | Threaded
Open this post in threaded view
|

Re: Mistake assert tips in FST builder ?

Tomás Fernández Löbbe
The Lucene list is probably better for this question. I'd try
[hidden email]

On Mon, Apr 15, 2019 at 9:04 PM zhenyuan wei <[hidden email]> wrote:

> Hi,
>    With current newest version, 9.0.0-snapshot,In
> Builder.UnCompileNode.addArc() function,
> found this line:
>
> assert numArcs == 0 || label > arcs[numArcs-1].label: "arc[-1].label="
> + arcs[numArcs-1].label + " new label=" + label + " numArcs=" +
> numArcs;
>
> Maybe assert tips is :
>
> assert numArcs == 0 || label > arcs[numArcs-1].label:
> "arc[numArc-1].label=" + arcs[numArcs-1].label + " new label=" + label
> + " numArcs=" + numArcs;
>
> Is it a personal tips code style? or small mistake?
>
> Just curious about it.
>
Reply | Threaded
Open this post in threaded view
|

Re: Mistake assert tips in FST builder ?

Michael McCandless-2
In reply to this post by zhenyuan wei
Hello,

Indeed, you cosmetic fix looks great -- I'll push that change. Thanks for
noticing and raising!

Mike McCandless

http://blog.mikemccandless.com


On Tue, Apr 16, 2019 at 12:04 AM zhenyuan wei <[hidden email]> wrote:

> Hi,
>    With current newest version, 9.0.0-snapshot,In
> Builder.UnCompileNode.addArc() function,
> found this line:
>
> assert numArcs == 0 || label > arcs[numArcs-1].label: "arc[-1].label="
> + arcs[numArcs-1].label + " new label=" + label + " numArcs=" +
> numArcs;
>
> Maybe assert tips is :
>
> assert numArcs == 0 || label > arcs[numArcs-1].label:
> "arc[numArc-1].label=" + arcs[numArcs-1].label + " new label=" + label
> + " numArcs=" + numArcs;
>
> Is it a personal tips code style? or small mistake?
>
> Just curious about it.
>