clulab / processors

Natural Language Processors
https://clulab.github.io/processors/
417 stars 101 forks source link

Add test file #790

Closed kwalcock closed 4 months ago

kwalcock commented 4 months ago

@navalani, here is a framework to which one could add a bunch of rules for testing. Use or not as you see fit and ask questions, of course.

kwalcock commented 4 months ago

This will work best if code is moved out of OdinStarter to Debugger or somewhere that can be shared.

navalani commented 4 months ago

Got it. Will get to it soon

Nick

On Thu, Mar 14, 2024 at 2:37 PM Keith Alcock @.***> wrote:

External Email

This will work best if code is moved out of OdinStarter to Debugger or somewhere that can be shared.

— Reply to this email directly, view it on GitHub https://github.com/clulab/processors/pull/790#issuecomment-1998524351, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCCR2VJXQ5DFRGFIFYE7OP3YYIKDBAVCNFSM6AAAAABEW4GDYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGUZDIMZVGE . You are receiving this because you were mentioned.Message ID: @.***>

navalani commented 4 months ago

Hey Keith,

I need some help transferring code from OdinStarter to the Debugger. If you can brief me on what needs to be transferred, I can start working on it. The HashMap in theThompsonVM can be transferred, but populating it is a challenge.

Nick

On Thu, Mar 14, 2024 at 2:40 PM Nick Avalani @.***> wrote:

Got it. Will get to it soon

Nick

On Thu, Mar 14, 2024 at 2:37 PM Keith Alcock @.***> wrote:

External Email

This will work best if code is moved out of OdinStarter to Debugger or somewhere that can be shared.

— Reply to this email directly, view it on GitHub https://github.com/clulab/processors/pull/790#issuecomment-1998524351, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCCR2VJXQ5DFRGFIFYE7OP3YYIKDBAVCNFSM6AAAAABEW4GDYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGUZDIMZVGE . You are receiving this because you were mentioned.Message ID: @.***>

kwalcock commented 4 months ago

@navalani, OdinStarter.visualize and OdinStarter.visualizeExtractor can be moved to Debugger.visualize and Debugger.visualizeExtractor and then they can be called from either OdinStarter or TestTokenExtractorDebugger. It should be close to a copy and paste.

navalani commented 4 months ago

Done. Thanks

On Fri, Mar 15, 2024 at 2:33 PM Keith Alcock @.***> wrote:

External Email

@navalani https://github.com/navalani, OdinStarter.visualize and OdinStarter.visualizeExtractor can be moved to Debugger.visualize and Debugger.visualizeExtractor and then they can be called from either OdinStarter or TestTokenExtractorDebugger. It should be close to a copy and paste.

— Reply to this email directly, view it on GitHub https://github.com/clulab/processors/pull/790#issuecomment-2000470901, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCCR2VPOIEGKH2TE4ZNPHF3YYNSI5AVCNFSM6AAAAABEW4GDYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQGQ3TAOJQGE . You are receiving this because you were mentioned.Message ID: @.***>

navalani commented 4 months ago

Also another clarifying question, in TestTokenExtractorDebugger, what is a{1,3} in Rule("a and b", "a{1, 3} | b+") in line 56? I was trying to make more complex rules by looking at the ones already in there

Nick

On Fri, Mar 15, 2024 at 2:52 PM Nick Avalani @.***> wrote:

Done. Thanks

On Fri, Mar 15, 2024 at 2:33 PM Keith Alcock @.***> wrote:

External Email

@navalani https://github.com/navalani, OdinStarter.visualize and OdinStarter.visualizeExtractor can be moved to Debugger.visualize and Debugger.visualizeExtractor and then they can be called from either OdinStarter or TestTokenExtractorDebugger. It should be close to a copy and paste.

— Reply to this email directly, view it on GitHub https://github.com/clulab/processors/pull/790#issuecomment-2000470901, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCCR2VPOIEGKH2TE4ZNPHF3YYNSI5AVCNFSM6AAAAABEW4GDYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQGQ3TAOJQGE . You are receiving this because you were mentioned.Message ID: @.***>

kwalcock commented 4 months ago

@navalani, that's between 1 and 3 as. Be sure to check the LREC paper for tables of things like that. It's mostly regex-like things.

navalani commented 4 months ago

Thanks, I will.

On Fri, Mar 15, 2024 at 3:10 PM Keith Alcock @.***> wrote:

External Email

@navalani https://github.com/navalani, that's between 1 and 3 as. Be sure to check the LREC paper for tables of things like that. It's mostly regex-like things.

— Reply to this email directly, view it on GitHub https://github.com/clulab/processors/pull/790#issuecomment-2000570044, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCCR2VO3JXIGTUK6GRGWUPDYYNWVHAVCNFSM6AAAAABEW4GDYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQGU3TAMBUGQ . You are receiving this because you were mentioned.Message ID: @.***>