# # Copyright (c) 2020 Expert System Iberia # """Implements a sentence-level similarity reviewer based on a trained model for semantic similarity. """ from acred import content from acred.reviewer.similarity import label as simlabel from acred.service import claimsim from esiutils import isodate content.register_acred_type( 'SentSimilarityReview', { 'super_types': ['SimilarityReview', 'Review'], 'ident_keys': ['@type', 'dateCreated', 'author', 'itemReviewed', 'reviewRating'], 'route_template': '/review/{identifier}', 'itemref_keys': ['author', 'itemReviewed', 'reviewRating'] }) def bot_info(cfg): return claimsim.semSentSimReviewer(cfg) def review(item, config): """Reviews the incoming item and returns a Review object :param item: a single item or a list of items, in this case the items must be `ItemPair` instances, where both items are `Sentence`
# which fetches a reference article from acred import gcssearch from semantic_analyzer import url_scraper from semantic_analyzer import analyzer as semalyzer from semantic_analyzer import tweetrelsents as tweetsents logger = logging.getLogger(__name__) version = '0.1.1' content.register_acred_type( 'ArticleCredReviewer', { 'super_types': ['Bot', 'SoftwareApplication'], 'ident_keys': [ '@type', 'name', 'dateCreated', 'softwareVersion', 'isBasedOn', 'launchConfiguration' ], 'route_template': '/bot/{@type}/{softwareVersion}/{identifier}', 'itemref_keys': ['isBasedOn'] }) content.register_acred_type( 'ArticleCredReview', { 'super_types': ['CredibilityReview', 'Review'], 'ident_keys': [ '@type', 'dateCreated', 'author', 'itemReviewed', 'reviewRating', 'isBasedOn' ], 'route_template': '/review/{identifier}',
from acred import content from acred.rating import agg from acred.reviewer.credibility import label as credlabel import logging version = '0.1.2' dateCreated = '2020-06-05T13:23:00Z' ci_context = 'http://coinform.eu' logger = logging.getLogger(__name__) content.register_acred_type( 'ClaimReviewNormalizer', { 'super_types': ['SoftwareApplication', 'Bot'], 'ident_keys': [ '@type', 'name', 'dateCreated', 'softwareVersion', 'isBasedOn', 'launchConfiguration' ], 'route_template': '/bot/{@type}/{softwareVersion}/{identifier}', 'itemref_keys': ['isBasedOn'] }) content.register_acred_type( 'NormalisedClaimReview', { 'super_types': ['ClaimReview', 'Review'], 'ident_keys': [ '@type', 'dateCreated', 'author', 'claimReviewed', 'reviewRating', 'reviewAspect', 'basedOnClaimReview' ], 'route_template': '/review/{identifier}',