def extract_claim_and_review(self, parsed_claim_review_page: BeautifulSoup, url: str) -> List[Claim]: claim = Claim() self.claim = self.extract_claim(parsed_claim_review_page) self.review = self.extract_review(parsed_claim_review_page) rating_value = self.extract_rating_value(parsed_claim_review_page) claim.set_rating_value(rating_value) claim.set_alternate_name(self.translate_rating_value(rating_value)) claim.set_source(self.extract_author( parsed_claim_review_page)) # auteur de la review claim.set_author(self.extract_claimed_by( parsed_claim_review_page)) # ? auteur de la claim? # claim.setDatePublished(self.extract_date(parsed_claim_review_page)) #? publication de la claim claim.set_claim(self.claim) claim.set_body(self.review) claim.set_refered_links(self.extract_links(parsed_claim_review_page)) claim.set_title(self.extract_title(parsed_claim_review_page)) # date de la publication de la review claim.set_date(self.extract_date(parsed_claim_review_page)) claim.set_url(url) claim.set_tags(self.extract_tags(parsed_claim_review_page)) # extract_entities returns two variables json_claim, json_body = self.extract_entities(self.claim, self.review) claim.set_claim_entities(json_claim) claim.set_body_entities(json_body) return [claim]
def extract_claim_and_review(self, parsed_claim_review_page: BeautifulSoup, url: str) -> List[Claim]: """ I think that this method extract everything """ self.claim = self.extract_claim(parsed_claim_review_page) self.review = self.extract_review(parsed_claim_review_page) claim = Claim() claim.set_rating_value( self.extract_rating_value(parsed_claim_review_page)) claim.set_alternate_name( FatabyyanoFactCheckingSiteExtractor.translate_rating_value( self.extract_rating_value(parsed_claim_review_page))) claim.set_source("fatabyyano") claim.set_author("fatabyyano") claim.setDatePublished(self.extract_date(parsed_claim_review_page)) claim.set_claim(self.claim) claim.set_body(self.review) claim.set_refered_links(self.extract_links(parsed_claim_review_page)) claim.set_title(self.extract_claim(parsed_claim_review_page)) claim.set_date(self.extract_date(parsed_claim_review_page)) claim.set_url(url) claim.set_tags(self.extract_tags(parsed_claim_review_page)) # extract_entities returns two variables json_claim, json_body = self.extract_entities(self.claim, self.review) claim.set_claim_entities(json_claim) claim.set_body_entities(json_body) return [claim]