This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
ui <- shinyUI(fluidPage( | |
titlePanel("Testing File upload"), | |
sidebarLayout( | |
sidebarPanel( | |
fileInput('file_input', 'upload file ( . pdf format only)', accept = c('.pdf')) | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# save this to '_chat.txt` (it require a login) | |
# https://www.kaggle.com/sarthaknautiyal/whatsappsample | |
library(ore) | |
library(dplyr) | |
emoji_src <- "https://raw.githubusercontent.com/laurenancona/twimoji/gh-pages/twitterEmojiProject/emoticon_conversion_noGraphic.csv" | |
emoji_fil <- basename(emoji_src) | |
if (!file.exists(emoji_fil)) download.file(emoji_src, emoji_fil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import newspaper | |
from nltk import word_tokenize | |
import enchant | |
import re | |
url = 'https://hackernoon.com/dilemmas-of-a-digital-lifestyle-27c044940157' #input URL | |
my_article = newspaper.Article(url,language='en') # ### Extracting the Article Content | |
my_article.download() | |
my_article.parse() | |
d = enchant.Dict("en_US") # ### Spell-Checking the tokenized words | |
print(list(set([word.encode('ascii', 'ignore') for word in word_tokenize(my_article.text) if d.check(word) is False and re.match('^[a-zA-Z ]*$',word)] ))) |
NewerOlder