Skip to content

Intersection query for relevant_pages #509

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

Merged
merged 2 commits into from
May 24, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Additional tests for relevant_pages()
  • Loading branch information
Chipe1 committed Apr 18, 2017
commit 0429539a21f70c4dc0d58c29c19016663bae3deb
10 changes: 7 additions & 3 deletions tests/test_nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_lexicon():
href="https://google.com.au"
< href="/wiki/TestThing" > href="/wiki/TestBoy"
href="/wiki/TestLiving" href="/wiki/TestMan" >"""
testHTML2 = "Nothing"
testHTML2 = "a mom and a dad"
testHTML3 = """
<!DOCTYPE html>
<html>
Expand Down Expand Up @@ -106,9 +106,13 @@ def test_expand_pages():


def test_relevant_pages():
pages = relevant_pages("male")
assert all((x in pages.keys()) for x in ['A', 'C', 'E'])
pages = relevant_pages("his dad")
assert all((x in pages) for x in ['A', 'C', 'E'])
assert all((x not in pages) for x in ['B', 'D', 'F'])
pages = relevant_pages("mom and dad")
assert all((x in pages) for x in ['A', 'B', 'C', 'D', 'E', 'F'])
pages = relevant_pages("philosophy")
assert all((x not in pages) for x in ['A', 'B', 'C', 'D', 'E', 'F'])


def test_normalize():
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy