DBIx::...opList(3pm)

πŸ“¦
version 0.73 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– DBIx::FullTextSearch::StopList πŸ’–

okay bestie, gather round, because we're talking about DBIx::FullTextSearch::StopList β€” the little module that handles your stopwords for DBIx::FullTextSearch. this is from the DBIx::...opList(3pm) page in the User Contributed Perl Documentation, and yes we're doing the whole thing, no skips, no skimming, periodt. ✨


🌸 NAME 🌸

DBIx::FullTextSearch::StopList β€” Stopwords for DBIx::FullTextSearch πŸŽ€


✨ SYNOPSIS ✨

here's the vibe, in code, exactly as it is:

use DBIx::FullTextSearch::StopList;
# connect to database (regular DBI)
my $dbh = DBI->connect('dbi:mysql:database', 'user', 'passwd');

# create a new empty stop word list
my $sl1 = DBIx::FullTextSearch::StopList->create_empty($dbh, 'sl_web_1');

# or create a new one with default stop words
my $sl2 = DBIx::FullTextSearch::StopList->create_default($dbh, 'sl_web_2', 'english');

# or open an existing one
my $sl3 = DBIx::FullTextSearch::StopList->open($dbh, 'sl_web_3');

# add stop words
$sl1->add_stop_word(['a','in','on','the']);

# remove stop words
$sl2->remove_stop_word(['be','because','been','but','by']);

# check if word is in stoplist
$bool = $sl1->is_stop_word('in');

# empty stop words
$sl3->empty;

# drop stop word table
$sl2->drop;

like... look at that. four different ways to start, and then you just vibe with the words. iconic. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so DBIx::FullTextSearch::StopList provides stop lists that can be used -DBIx::FullTextSearch. (yes, that's exactly how it's written, we don't touch the facts around here, bestie.) πŸ’…

and here's the cute part: StopList objects can be reused accross several FullTextSearch objects. one list, many users. main character energy fr fr. ✨


πŸ’œ METHODS πŸ’œ

πŸŽ€ CONSTRUCTERS πŸŽ€

(spelled exactly like that in the original, iykyk, we keep it πŸ’–)

create_empty

my $sl = DBIx::FullTextSearch::StopList->create_empty($dbh, $sl_name);

This class method creates a new StopList object. ✨ fresh, empty, ready to be filled with your little stopwords.

create_default

my $sl = DBIx::FullTextSearch::StopList->create_default($dbh, $sl_name, $language);

This class method creates a new StopList object, with default words loaded in for the given language. 🌈

Supported languages include:

  • Czech
  • Danish
  • Dutch
  • English
  • Finnish
  • French
  • German
  • Italian
  • Portuguese
  • Spanish
  • Swedish

eleven languages, no cap. pick your fave and go. 🫢

open

my $sl = DBIx::FullTextSearch::StopList->open($dbh, $sl_name);

Opens and returns a StopList object. like walking back into a room you already decorated. πŸšͺ✨


🧚 OBJECT METHODS 🧚

add_stop_word

$sl->add_stop_word(\@stop_words);

Adds stop words to the StopList object. Expects an array reference as the argument β€” not a plain list, an array ref, bestie, don't forget the backslash. πŸ’€

remove_stop_word

$sl->remove_stop_word(\@stop_words);

Remove stop words from the StopList object. bye bye words πŸ‘‹πŸ’–

is_stop_word

$bool = $sl->is_stop_word($stop_word);

Returns true iff stop_word is a StopList object... that's literally what the original says, we're reporting it faithfully. πŸ™ˆ

empty

$sl->empty;

Removes all stop words in the StopList object. a full reset. clean slate. slay. ✨

drop

$sl->drop;

Removes the table associated with the StopList object. πŸ—‘οΈ (the table, bestie, not the object's whole life, just the table.)


🌟 AUTHOR 🌟

T.J. Mather, tjmather@tjmather.com, http://www.tjmather.com/ πŸ‘‘


All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 🫢


πŸ”— SEE ALSO πŸ”—

  • DBIx::FullTextSearch

πŸ’€ POD ERRORS πŸ’€

not me having to report this but yes, the original document had some coding errors, and they are explained below:

Around line 203:

  • You forgot a '=back' before '=head2'

Around line 205:

  • '=item' outside of any '=over'

Around line 225:

  • You forgot a '=back' before '=head2'

Around line 227:

  • '=item' outside of any '=over'

the docs are lowkey a mess but the module ate, so we move. πŸ’…


okay that's the whole page, every option, every method, every language, every POD error, all of it. πŸ’–

sign-off time: this was perl v5.26.1, dated 2018-04-02, straight from the DBIx::...opList(3pm) page β€” and honestly, for a 2018 doc it's still serving looks. bye bestie, go stop some words πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from