Last active
April 27, 2021 21:06
-
-
Save UrszulaCzerwinska/cd03ccee2b7d056c65bed7acfbcec1c0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #ipmort finction from other gists | |
| from entites_graph import NewsMining | |
| from html_file_parsing import ArticleParsing | |
| #imports | |
| import pandas as pd | |
| # set url | |
| url = "https://towardsdatascience.com/cat-dog-or-elon-musk-145658489730" | |
| # extract text | |
| ap= ArticleParsing(url) | |
| res = ap.main() | |
| # article content to text | |
| content = '. '.join([res.title[0], res.subtitle[0], res.text[0]]) | |
| # extract NERs and graph dependences | |
| Miner = NewsMining() | |
| Miner.main(content,mynewmodel, js=True) # creates graph_show.html dans local repo | |
| # export dependency graph | |
| _input =pd.DataFrame(Miner.events) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment