[
    {
        "label": "stopwords",
        "importPath": "nltk.corpus",
        "description": "nltk.corpus",
        "isExtraImport": true,
        "detail": "nltk.corpus",
        "documentation": {}
    },
    {
        "label": "PorterStemmer",
        "importPath": "nltk.stem",
        "description": "nltk.stem",
        "isExtraImport": true,
        "detail": "nltk.stem",
        "documentation": {}
    },
    {
        "label": "word_tokenize",
        "importPath": "nltk.tokenize",
        "description": "nltk.tokenize",
        "isExtraImport": true,
        "detail": "nltk.tokenize",
        "documentation": {}
    },
    {
        "label": "sent_tokenize",
        "importPath": "nltk.tokenize",
        "description": "nltk.tokenize",
        "isExtraImport": true,
        "detail": "nltk.tokenize",
        "documentation": {}
    },
    {
        "label": "requests",
        "kind": 6,
        "isExtraImport": true,
        "importPath": "requests",
        "description": "requests",
        "detail": "requests",
        "documentation": {}
    },
    {
        "label": "BeautifulSoup",
        "importPath": "bs4",
        "description": "bs4",
        "isExtraImport": true,
        "detail": "bs4",
        "documentation": {}
    },
    {
        "label": "run_summarization",
        "kind": 2,
        "importPath": "scripts.summarizer",
        "description": "scripts.summarizer",
        "peekOfCode": "def run_summarization(text):\n    # 1 Create the word frequency table\n    freq_table = _create_frequency_table(text)\n    '''\n    We already have a sentence tokenizer, so we just need\n    to run the sent_tokenize() method to create the array of sentences.\n    '''\n    # 2 Tokenize the sentences\n    sentences = sent_tokenize(text)\n    # 3 Important Algorithm: score the sentences",
        "detail": "scripts.summarizer",
        "documentation": {}
    },
    {
        "label": "get_text_from_url",
        "kind": 2,
        "importPath": "scripts.summarizer",
        "description": "scripts.summarizer",
        "peekOfCode": "def get_text_from_url(url):\n    # add #readme to url to get the readme file\n    url = url + '#readme'\n    page = requests.get(url).text\n    soup = BeautifulSoup(page, 'lxml') # lxml is the parser\n    # kill all script and style elements\n    for script in soup([\"script\", \"style\"]):\n        script.extract()    # rip it out\n    # get text\n    text = soup.get_text()",
        "detail": "scripts.summarizer",
        "documentation": {}
    },
    {
        "label": "text_str",
        "kind": 5,
        "importPath": "scripts.summarizer",
        "description": "scripts.summarizer",
        "peekOfCode": "text_str = '''\nThose Who Are Resilient Stay In The Game Longer\n“On the mountains of truth you can never climb in vain: either you will reach a point higher up today, or you will be training your powers so that you will be able to climb higher tomorrow.” — Friedrich Nietzsche\nChallenges and setbacks are not meant to defeat you, but promote you. However, I realise after many years of defeats, it can crush your spirit and it is easier to give up than risk further setbacks and disappointments. Have you experienced this before? To be honest, I don’t have the answers. I can’t tell you what the right course of action is; only you will know. However, it’s important not to be discouraged by failure when pursuing a goal or a dream, since failure itself means different things to different people. To a person with a Fixed Mindset failure is a blow to their self-esteem, yet to a person with a Growth Mindset, it’s an opportunity to improve and find new ways to overcome their obstacles. Same failure, yet different responses. Who is right and who is wrong? Neither. Each person has a different mindset that decides their outcome. Those who are resilient stay in the game longer and draw on their inner means to succeed.\nI’ve coached mummy and mom clients who gave up after many years toiling away at their respective goal or dream. It was at that point their biggest breakthrough came. Perhaps all those years of perseverance finally paid off. It was the 19th Century’s minister Henry Ward Beecher who once said: “One’s best success comes after their greatest disappointments.” No one knows what the future holds, so your only guide is whether you can endure repeated defeats and disappointments and still pursue your dream. Consider the advice from the American academic and psychologist Angela Duckworth who writes in Grit: The Power of Passion and Perseverance: “Many of us, it seems, quit what we start far too early and far too often. Even more than the effort a gritty person puts in on a single day, what matters is that they wake up the next day, and the next, ready to get on that treadmill and keep going.”\nI know one thing for certain: don’t settle for less than what you’re capable of, but strive for something bigger. Some of you reading this might identify with this message because it resonates with you on a deeper level. For others, at the end of their tether the message might be nothing more than a trivial pep talk. What I wish to convey irrespective of where you are in your journey is: NEVER settle for less. If you settle for less, you will receive less than you deserve and convince yourself you are justified to receive it.\n“Two people on a precipice over Yosemite Valley” by Nathan Shipps on Unsplash\nDevelop A Powerful Vision Of What You Want\n“Your problem is to bridge the gap which exists between where you are now and the goal you intend to reach.” — Earl Nightingale\nI recall a passage my father often used growing up in 1990s: “Don’t tell me your problems unless you’ve spent weeks trying to solve them yourself.” That advice has echoed in my mind for decades and became my motivator. Don’t leave it to other people or outside circumstances to motivate you because you will be let down every time. It must come from within you. Gnaw away at your problems until you solve them or find a solution. Problems are not stop signs, they are advising you that more work is required to overcome them. Most times, problems help you gain a skill or develop the resources to succeed later. So embrace your challenges and develop the grit to push past them instead of retreat in resignation. Where are you settling in your life right now? Could you be you playing for bigger stakes than you are? Are you willing to play bigger even if it means repeated failures and setbacks? You should ask yourself these questions to decide whether you’re willing to put yourself on the line or settle for less. And that’s fine if you’re content to receive less, as long as you’re not regretful later.",
        "detail": "scripts.summarizer",
        "documentation": {}
    },
    {
        "label": "#username",
        "kind": 5,
        "importPath": "scripts.summarizer",
        "description": "scripts.summarizer",
        "peekOfCode": "#username = '{}'\n#project_name = 'https://github.com/{}/PySeas'\nbeta = False\nimport requests\nfrom bs4 import BeautifulSoup\nif beta:\n    # Implementation from https://dev.to/davidisrawi/build-a-quick-summarizer-with-python-and-nltk\n    from nltk.corpus import stopwords\n    from nltk.stem import PorterStemmer\n    from nltk.tokenize import word_tokenize, sent_tokenize",
        "detail": "scripts.summarizer",
        "documentation": {}
    },
    {
        "label": "#project_name",
        "kind": 5,
        "importPath": "scripts.summarizer",
        "description": "scripts.summarizer",
        "peekOfCode": "#project_name = 'https://github.com/{}/PySeas'\nbeta = False\nimport requests\nfrom bs4 import BeautifulSoup\nif beta:\n    # Implementation from https://dev.to/davidisrawi/build-a-quick-summarizer-with-python-and-nltk\n    from nltk.corpus import stopwords\n    from nltk.stem import PorterStemmer\n    from nltk.tokenize import word_tokenize, sent_tokenize\n    def _create_frequency_table(text_string) -> dict:",
        "detail": "scripts.summarizer",
        "documentation": {}
    },
    {
        "label": "beta",
        "kind": 5,
        "importPath": "scripts.summarizer",
        "description": "scripts.summarizer",
        "peekOfCode": "beta = False\nimport requests\nfrom bs4 import BeautifulSoup\nif beta:\n    # Implementation from https://dev.to/davidisrawi/build-a-quick-summarizer-with-python-and-nltk\n    from nltk.corpus import stopwords\n    from nltk.stem import PorterStemmer\n    from nltk.tokenize import word_tokenize, sent_tokenize\n    def _create_frequency_table(text_string) -> dict:\n        \"\"\"",
        "detail": "scripts.summarizer",
        "documentation": {}
    }
]