Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scraping reliability score #72

Open
georgerichardson opened this issue Feb 18, 2017 · 1 comment
Open

Scraping reliability score #72

georgerichardson opened this issue Feb 18, 2017 · 1 comment

Comments

@georgerichardson
Copy link

georgerichardson commented Feb 18, 2017

Write a function in article.Article that calculates the percentage of scraped fields which are returned empty.

We may consider expanding the definition of scraping reliability later, so suggestions welcome.

@georgerichardson georgerichardson added this to the interpreter v0.1 milestone Feb 18, 2017
@georgerichardson georgerichardson changed the title Accuracy score for fact extraction Accuracy score for fact extraction from a given article Feb 18, 2017
@georgerichardson georgerichardson changed the title Accuracy score for fact extraction from a given article Scraping reliability score Mar 2, 2017
@ghost
Copy link

ghost commented Mar 2, 2017

We can exploit '''vars()''' for this end:

## loop through each self variable in article class and test they're not 0, False, or None

def reliability(article):
	return (len([v for v in vars(article).values() if(v)])/
		    len(vars(article)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant