Package: gotstopwords
Got Stop WordsPython package that makes it easy to usestop wordslists in Python projects. The set of lists contained within the package reflect an organization of lists collected across the Internet. Lists are available for36 unique languages, with multiple lists available for a number of languages including English, Spanish and Hindi. As expected, different lists for the same language have different, albeit overlapping, sets of words. Lists are divided into two banks:nltk: These stop words lists are sourced from theNatural Language Toolkit website.other: This is a collection of stop words lists gathered from various sources.Bank# of Lists# of Unique Languages in Banknltk2929other2725As mentioned, there are lists for 36 unique languages acrossbothbanks.nltkBank Available Languages29 stop words lists for 29 unique languages are available in thenltkbank.ArabicAzerbaijaniBasqueBengaliCatalanChineseDanishDutchEnglishFinnishFrenchGermanGreekHebrewHinglishHungarianIndonesianItalianKazakhNepaliNorwegianPortugueseRomanianRussianSloveneSpanishSwedishTajikTurkishotherBank Available Languages27 stop words lists for 25 unique languages are available in theotherbank.ArabicArmenianBulgarianChineseDanishDutchEnglishFinnishFrenchGermanGreekHindi 1Hindi 2IndonesianItalianJapaneseLatvianNorwegianPersianPolish 1Polish 2PortugueseRomanianRussianSpanishSwedishTurkishInstallationpip install gotstopwordsUsageImporting the PackagefromgotstopwordsimportgotstopwordsloadMethodTheloadmethod is used to load a stop words list with the following parameters:bank: The name of the list's bank,nltkorother.lang: The name of the language as spelled in English, e.g.norwegian,orthe language's two-letter ISO 639-1 code. See below for a table of ISO 639-1 codes.list_num: The number of the desired list for those languages with more than 1 list in a bank, such as Hindi and Polish in theotherbank. Thelist_numparameter can be omitted for those languages with only a single list.ExamplesLoading the stop words list for Finnish, ISO 639-1 codefi, from thenltkbank._finnish=gotstopwords.load("nltk","fi")# or_finnish=gotstopwords.load("nltk","finnish")Loading the stop words list for Spanish, ISO 639-1 codees, from thenltkbank._spanish=gotstopwords.load("nltk","es")# or_spanish=gotstopwords.load("nltk","spanish")Loading the stop words list for English, ISO 639-1 codeen, from theotherbank._english=gotstopwords.load("other","en")# or_english=gotstopwords.load("other","english")Loading the first stop words list for Hindi, ISO 639-1 codehi, from theotherbank._hindi1=gotstopwords.load("other","hi","1")# or_hindi1=gotstopwords.load("other","hindi","1")# or_hindi1=gotstopwords.load("other","hi",1)# or_hindi1=gotstopwords.load("other","hindi",1)Stop words lists are returned as a Python list. If there is no stop words list associated with the values that are input, an empty list will be returned.Note:Bank and language names can also be entered with capital letters if desired.ISO 639-1 Language CodesNote:There is no ISO 639-1 code for Hinglish. However, the package permits specification of the Hinglish stop words list using the 2-character codehn.ISO 639-1 CodeLanguageararabicazazerbaijanibgbulgarianbnbengalicacatalandadanishdegermanelgreekenenglishesspanisheubasquefapersianfifinnishfrfrenchhehebrewhihindihuhungarianhyarmenianidindonesianititalianjajapanesekkkazakhlvlatviannenepalinldutchnonorwegianplpolishptportugueseroromanianrurussianslslovevesvswedishtgtajiktrturkishzhchineseSourcesNLTK word lists are obtained from:http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/snowball/stopwords/LicenseThis project is licensed under the terms of theMITlicense.