WikiPlots | A dataset containing story plots from Wikipedia

 by   markriedl Python Version: Current License: No License

kandi X-RAY | WikiPlots Summary

kandi X-RAY | WikiPlots Summary

WikiPlots is a Python library. WikiPlots has no bugs, it has no vulnerabilities and it has low support. However WikiPlots build file is not available. You can download it from GitHub.

The WikiPlots corpus is a collection of 112,936 story plots extracted from English language Wikipedia. These stories are extracted from any English language article that contains a sub-header that contains the word "plot" (e.g., "Plot", "Plot Summary", etc.). This repository contains code and instructions for how to recreate the WikiPlots corpus.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              WikiPlots has a low active ecosystem.
              It has 263 star(s) with 28 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 5 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of WikiPlots is current.

            kandi-Quality Quality

              WikiPlots has 0 bugs and 8 code smells.

            kandi-Security Security

              WikiPlots has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              WikiPlots code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              WikiPlots does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              WikiPlots releases are not available. You will need to build from source code and install.
              WikiPlots has no build file. You will be need to create the build yourself to build the component from source.
              WikiPlots saves you 27 person hours of effort in developing the same functionality from scratch.
              It has 75 lines of code, 0 functions and 1 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of WikiPlots
            Get all kandi verified functions for this library.

            WikiPlots Key Features

            No Key Features are available at this moment for WikiPlots.

            WikiPlots Examples and Code Snippets

            No Code Snippets are available at this moment for WikiPlots.

            Community Discussions

            Trending Discussions on WikiPlots

            QUESTION

            Extract story plots from Wikipedia
            Asked 2022-Feb-18 at 21:32
            Goal

            I want to extract story plots from the English Wikipedia. I'm only looking for a few (~100) and the source of the plots doesn't matter, e.g. novels, video games, etc.

            I briefly tried a few things that didn't work, and need some clarification on what I'm missing and where to direct my efforts. It would be nice if I could avoid manual parsing and could get just issue a single query.

            Things I tried 1. markriedl/WikiPlots

            This repo downloads the pages-articles dump, expands it using wikiextractor, then scans each article and saves the contents of each section whose title contains "plot". This is a heavy-handed method of achieving what I want, but I gave it a try and failed. I had to run wikiextractor inside Docker because there are known issues with Windows, and then wikiextractor failed because there is a problem with the --html flag.

            I could probably get this working but it would take a lot of effort and there seemed like better ways.

            2. Wikidata

            I used the Wikidata SPARQL service and was able to get some queries working, but it seems like Wikidata only deals with metadata and relationships. Specifically, I was able to get novel titles but unable to get novel summaries.

            3. DBpedia

            In theory, DBpedia should be exactly what I want because it's "Wikipedia but structured", but they don't have nice tutorials and examples like Wikidata so I couldn't figure out how to use their SPARQL endpoint. Google wasn't much help either and seemed to imply that it's common to setup your own graph DB to query, which is beyond my scope.

            4. Quarry

            This is a new query service that lets you query several Wikimedia databases. Sounds promising but I was again unable to grab content.

            5. PetScan & title download

            This SO answer says I can query PetScan to get Wikipedia titles, download HTML from Wikipedia.org, then parse that HTML. This sounds like it would work, but PetScan looks intimidating and this involves HTML parsing that I want to avoid if possible.

            ...

            ANSWER

            Answered 2022-Feb-18 at 21:32

            There's no straightforward way to do this as Wikipedia content isn't structured as you would like it to be. I'd use petscan to get a list of articles based on the category, feed them in to e.g. https://en.wikipedia.org/w/api.php?action=parse&page=The%20Hobbit&format=json&prop=sections iterate through the sections and if the 'line' attribute == 'Plot' then call e.g. https://en.wikipedia.org/w/api.php?action=parse&page=The%20Hobbit&format=json&prop=text&section=2 where 'section' = 'number' of the section titled plot. That gives you html and I can't figure out how to just get the plain text, but you might be able to make sense of https://www.mediawiki.org/w/api.php?action=help&modules=parse

            Source https://stackoverflow.com/questions/71175922

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install WikiPlots

            You can download it from GitHub.
            You can use WikiPlots like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/markriedl/WikiPlots.git

          • CLI

            gh repo clone markriedl/WikiPlots

          • sshUrl

            git@github.com:markriedl/WikiPlots.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link