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

  • Home
  • SEARCH
  • 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 8487829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:21:42+00:00 2026-06-10T21:21:42+00:00

My dear friends I would like to know how can i lowercase the stop

  • 0

My dear friends I would like to know how can i lowercase the stop words in NLTK in a list named tokens

import nltk
from nltk.corpus import stopwords
tokens= ['TOWING', 'VESSEL', 'XXXX', 'XXXX', 'XXXX', 'WAS', 'FACING', 'UP', 'TO', 'BARGES', 'IN', 'MON', 'VIEW', 'MININGS', 'FLEET', 'WHEN', 'WIRE', 'CABLE', 'AT', 'THE', 'CELL', 'PARTED', 'STRIKING', 'XXX', 'XXX', 'IN', 'THE', 'LEFT', 'FOREARM', 'LUNDY', 'WAS', 'TAKEN', 'TO', 'THE', 'HOSPITAL', 'VIA', 'AMBULANCE', 'AND', 'DIAGNOSED', 'WITH', 'XXX']

stop_list = ['all', 'just', 'being', 'over', 'both', 'through', 'yourselves', 'its', 'before', 'herself', 'had', 'should', 'to', 'only', 'under', 'ours', 'has', 'do', 'them', 'his', 'very', 'they',
         'not', 'during', 'now', 'him', 'nor', 'did', 'this', 'she', 'each', 'further', 'where', 'few', 'because', 'doing', 'some', 'are', 'our', 'ourselves', 'out', 'what', 'for', 'while', 'does', 'above', 'between', 't',
         'be', 'we', 'who', 'were', 'here', 'hers', 'by', 'on', 'about', 'of', 'against', 's', 'or', 'own', 'into', 'yourself', 'down', 'your', 'from', 'her', 'their', 'there', 'been', 'whom', 'too', 'themselves', 'was',
         'until', 'more', 'himself', 'that', 'but', 'don', 'with', 'than', 'those', 'he', 'me', 'myself', 'these', 'up', 'will', 'below', 'can', 'theirs', 'my', 'and', 'then', 'is', 'am', 'it', 'an', 'as', 'itself', 'at',
         'have', 'in', 'any', 'if', 'again', 'no', 'when', 'same', 'how', 'other', 'which', 'you', 'after', 'most', 'such', 'why', 'a', 'off', 'i', 'yours', 'so', 'the', 'having', 'once']

english_stops = set(stopwords.words('english'))
for coid in range(0,len(english_stops)):
for coidrec in range(0,len(tokens)):
    if tokens[coidrec].isupper():
        if tokens[coidrec].lower == stop_list[coid]:
            tokens[i].lower
        else:
            pass
tokens
['TOWING', 'VESSEL', 'XXXX', 'XXXX', 'XXXX', 'WAS', 'FACING', 'UP', 'TO', 'BARGES', 'IN', 'MON', 'VIEW', 'MININGS', 'FLEET', 'WHEN', 'WIRE', 'CABLE', 'AT', 'THE', 'CELL', 'PARTED', 'STRIKING', 'XXX', 'XXX', 'IN', 'THE', 'LEFT', 'FOREARM', 'LUNDY', 'WAS', 'TAKEN', 'TO', 'THE', 'HOSPITAL', 'VIA', 'AMBULANCE', 'AND', 'DIAGNOSED', 'WITH', 'XXX']
  • 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-10T21:21:44+00:00Added an answer on June 10, 2026 at 9:21 pm

    Try this:

    tokens = [token.lower() for token in tokens]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dear Friends from Stackoverflow, Please help me with a problem that i'm having when
Dear fellow programmers, I am working on my B&B's website www.bordemundo.com and would like
Dear friends,I want to extract text 平均3.6 星 from this code segment excerpted from
hi my dear friends : how can i get href attrib of anchor element
Dear friends, I need your help. I need to send .bmp file to another
Dear friends, i'm concerned if i'm making a bad use of references in C++
Hi dear friends i have 495 cells and a textField for inserting number and
Dear visitors stackoverflow! I can not solve a simple problem: Body given the background
Dear Friends good afternoon. My problem may be this is very basic one i.e.
hi my dear friends : i am asp.net web developer and never work with

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.