Code Monkey home page Code Monkey logo

Comments (4)

attardi avatar attardi commented on June 23, 2024

You can remove the tags with a simple sed script, eg.

sed  '/^<[^>]*>$/dā€™

ā€”

On 23 mag 2016, at 10:22, kylemadigan [email protected] wrote:

Hi ,

I have tried cleaning my document using this: python WikiExtractor.py testfile.xml -o extractedcommand. And I got the following result:

Category:Scientific method

A scientific method is a sequence or collection of processes that are considered characteristic of scientific investigation and the acquisition of new scientific knowledge based upon physical evidence.

Category:Scientific terminology Category:Science and engineering awards

This category includes all prizes and awards relating to science, engineering, technology, and mathematics.

Scientific criticisms are a body of analysis of scientific methodologies, philosophies, and possible negative roles media and politics play in scientific research. Criticism of science is distinct from the academic positions of antiscience or anti-intellectualism which seek to reject entirely the scientific method. Rather, criticism is made to address and refine problems within the sciences in order to improve science as a whole, and its role in society.

That is with the tags still visible, how do i remove all xml tags using wikiextractor?

I have tried :

python WikiExtractor.py testfile.xml -o --no-templates --escapedoc

but unfortunately it does not work either. Please help me.

Thank you

ā€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

from wikiextractor.

kylemadigan avatar kylemadigan commented on June 23, 2024

Hi I am not very sure what you mean? Can you be more specific please. Thank you.

from wikiextractor.

josemazo avatar josemazo commented on June 23, 2024

Hi @kylemadigan!

You can use the feature I added in the #59 pull request.

Let me know if that work for you.

from wikiextractor.

hannan510 avatar hannan510 commented on June 23, 2024

"""
import matplotlib.pyplot as plt
from bs4 import BeautifulSoup
import nltk
from nltk import word_tokenize
from nltk.corpus import stopwords
import re
from nltk.util import ngramstext
from collections import Counter
from nltk.stem import PorterStemmer
from nltk import ngrams
from nltk.probability import FreqDist
soup = BeautifulSoup(open("C:\Users\x\Downloads\wiki_00", encoding="utf8"), "html.parser")
text = soup.get_text()

from wikiextractor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.