KinoSe...enBatch(3pm)

πŸ’– KinoSearch1::Analysis::TokenBatch β€” a collection of tokens πŸ’–

okay bestie, so this is KinoSearch1::Analysis::TokenBatch β€” like, the whole vibe is "add many tokens to the batch, by supplying the string to be tokenized, and arrays of token starts and token ends (specified in bytes)." 🫢 It's part of the User Contributed Perl Documentation, so you know it's the people's manpage.


✨ NAME ✨

KinoSearch1::Analysis::TokenBatch β€” a collection of tokens πŸ’…


🌸 SYNOPSIS 🌸

while ( $batch->next ) {
    $batch->set_text( lc( $batch->get_text ) );
}

πŸ§ͺ EXPERIMENTAL API πŸ§ͺ

gird ur loins bestie β€” TokenBatch's API should be considered experimental and is likely to change. 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

A TokenBatch is literally just a collection of Tokens πŸŽ€ which you can add to, and then iterate over. That's it, that's the whole girl. Adding and then looping. Periodt.


⭐ METHODS ⭐

πŸ’œ new

my $batch = KinoSearch1::Analysis::TokenBatch->new;

Constructor. Ya build a batch. 🌈

πŸ’œ append

$batch->append( $text, $start_offset, $end_offset, $pos_inc );

Add a Token to the end of the batch, no cap. It accepts either three or four arguments: text, start_offset, end_offset, and an optional position increment which defaults to 1 if you don't supply it. πŸ“ For a description of what these arguments actually mean mean, go see the docs for Token. iykyk.

πŸ’œ next

while ( $batch->next ) {
    # ...
}

Proceed to the next token in the TokenBatch. Returns true if the TokenBatch ends up located at a valid token. slay. πŸ”₯


πŸ‘‘ ACCESSOR METHODS πŸ‘‘

All of TokenBatch's accessor methods affect the current Token. Calling any of these methods when the TokenBatch is not located at a valid Token will trigger an exception β€” so stay in ur lane and only call them when you're actually sitting on a token, bestie. πŸ’€

  • set_text / get_text β€” Set/get the text of the current Token.
  • set_start_offset / get_start_offset β€” Set/get the start_offset of the current Token.
  • set_end_offset / get_end_offset β€” Set/get the end_offset of the current Token.
  • set_pos_inc / get_pos_inc β€” Set/get the position increment of the current Token.

Copyright 2005-2010 Marvin Humphrey


πŸŽ€ LICENSE, DISCLAIMER, BUGS, etc. πŸŽ€

See KinoSearch1 version 1.01.


okay that's the whole page, you ate it fr fr πŸ’– this was KinoSe...enBatch(3pm) from perl v5.42.3, dated 2026-08-20 β€” go forth and tokenize, main character πŸŒΈβœ¨πŸ’…

πŸ“¦ where this page comes from