Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8421389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:08:15+00:00 2026-06-10T03:08:15+00:00

I am using Perl’s Lingua::Stem module ( Lingua::Stem ) and I want to have

  • 0

I am using Perl’s Lingua::Stem module (Lingua::Stem) and I want to have a text file or other editable file format to contain a list of words I do not want stemmed. I want to be able to add words to the file any time.

Their example shows:

add_exceptions($exceptions_hash_ref);

What is the best way to do this?

I used their method in hard coding some exceptions, but I want to do this with a file.

# adding default exceptions
Lingua::Stem::add_exceptions({ 'emily' => 'emily',
                            'driven' => 'driven',
                        });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:08:17+00:00Added an answer on June 10, 2026 at 3:08 am

    Assuming your “editable” file is whitespace separated, like so:

    emily emily
    driven driven
    

    Your code could be:

    open my $fh, "<", "excep.txt" or die $!;
    my $href = { map split, <$fh> };
    Lingua::Stem::add_exceptions($href);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Perl to do text processing with regex. I have no control
We have been using Perl's Net:Twitter CPAN module (version 3.12) and basic authentication (not
I'm using Perl's module File::Find to traverse across a directory. This directory is an
I'm using Perl's format and write functions to output some text. The requirements are
I have trouble using Perl grep() with a string that may contain chars that
I'm using Perl's Archive::Tar module. It preserves the file permissions but doesn't preserve the
Using Perl, I want to print only the repeating (duplicate) values in each list.
I'm using perl and MongoDB::GridFS (along with other mongo modules) to store and retrieve
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am using Perl to print some data read from one file to another.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.