Skip to content

Commit

Permalink
Recognize all keywords per heading (#31) (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias-TH authored Jan 22, 2024
1 parent f8a2944 commit 168e518
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions backend/shacl_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,22 +332,18 @@ def process_readme_sections(graph: Graph, repo_entity: URIRef, soup: BeautifulSo
if any(keyword in lower_cased_heading for keyword in installation_instructions_keywords):
content = get_content_from_readme_section(heading, heading_tags)
graph.add((repo_entity, sd["hasInstallationInstructions"], Literal(content)))
continue

if any(keyword in lower_cased_heading for keyword in usage_notes_keywords):
content = get_content_from_readme_section(heading, heading_tags)
graph.add((repo_entity, sd["hasUsageNotes"], Literal(content)))
continue

if "purpose" in lower_cased_heading:
content = get_content_from_readme_section(heading, heading_tags)
graph.add((repo_entity, sd["hasPurpose"], Literal(content)))
continue

if any(keyword in lower_cased_heading for keyword in sw_requirements_keywords):
content = get_content_from_readme_section(heading, heading_tags)
graph.add((repo_entity, sd["softwareRequirements"], Literal(content)))
continue

if any(keyword in lower_cased_heading for keyword in citation_keywords):
content = get_content_from_readme_section(heading, heading_tags)
Expand Down

0 comments on commit 168e518

Please sign in to comment.