article = "violence broke out across france on saturday during the latest day of demonstrations against hardship in schools and the cost of livingat least people were arrested during what the french government described as an escalation in violence alongside an estimated taking to the streetsin paris there were significant clashes into the evening with riot police who used tear gas and water cannon on crowdsbuildings were set alight in the capital and other areas including limoges where large fire in the town hall caused the roof to partly collapselooting broke out in several cities with widespread vandalism targeting city halls and businesses also reportedprime minister sébastien lecornu said police officers were injured in the unrestin the french capital the main march appeared to be largely peaceful during the afternoon a group of young people told the bbc that they were pacifists who were just trying to make things change but nothing is moving"

stopwords = ["a", "an", "the", "in", "on", "at", "of", "to", "for",
             "and", "or", "but", "as", "with", "by", "from",
             "is", "am", "are", "was", "were", "be", "been",
             "it", "its", "this", "that", "these", "those",
             "he", "she", "they", "we", "you", "i", "out",
             "his", "her", "their", "our", "who", "which",
             "just", "also"]

print("*************")
print("202606028 / 서지우") 
print("*************")

print("전처리 전 글자수:", len(article))

words = article.split()   # 단어별로 쪼개기
result_list = []          # 불용어가 제거된 단어들을 담을 리스트 생성

for w in words:
    if w not in stopwords:    #추가
        result_list.append(w)

final_article = " ".join(result_list)

print("불용어 제거 후 글자수:", len(final_article)) #제거후 출력


print(final_article)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: