Coder Social home page Coder Social logo

snlpminiproject's Introduction

SNLPminiproject - Team Blitz

Diagram

Module

FactChecker : 

  • Tokenization of the input facts.
  • Break the generated tokens in the form of Subject and Object by identifying the Predicate.
  • Assigning true/false value to the fact by searching the predicate on wiki pages of the generated token.

LocalWiki :

  • It fetches the result wiki pages of generated tokens.
  • It also stores the previously fetched data in the formal on text files in Local Store folder.

Input: 
List of facts in natural language with their corresponding fact ids (train.tsv and test.tsv)

Output: 
Generates a triple file that maps the facts to its truth value (trainresult.ttl and testresult.ttl)

WorkFlow

  • Tokenization - Generate tokens for the fact, based on words starting with a capital letter including the prepositions following a noun.
  • Data fetch from Wiki - For each generated token check if the data exists in Local Store, if not fetch data from Wikipedia and store it in the Local Store.
  • Get predicate for the fact - For each fact generate a generic predicate based on the predefined list of predicates.
  • Search Data - Search the data of each token for pattern containing the predicate and the other token.
  • Assign Truth Value - If the pattern matches, assign true to the truth value.

Positive Example

Fact: 3820514 Alfonso XIII of Spain's birth place is Madrid.

  1. Tokenization:
    {"Alfonso XIII of Spain" ,"Madrid "}
  2. Data fetched from Wiki:
    token1: {"Alfonso XIII of Spain"} 
    token2: {"Madrid"}
  3. Get predicate for the fact:
    (B|b)orn.{0,150}(?i)
  4. Search Data:
    String "Born (1886-05-17)17 May 1886 Royal Palace of Madrid" found in the wiki page of token1 ("Alfonso XIII of Spain") 
  5. return truthValue =true for this fact.

Negative Example

Fact: 3885766 Lucille Ball's death place is Santa Monica, California.

  1. Tokenization:
    {"Lucille Ball" ,"Santa Monica, California "}
  2. Data fetched from Wiki:
    token1: {"Lucille Ball"} 
    token2: {"Santa Monica, California "}
  3. Get predicate for the fact:
    (Died).{0,150}(?i)
  4. Search Data:
    token2 not found in the wiki page of token1 with predicate
    token1 not found in the wiki page of token2 with predicate
  5. return truthValue =false for this fact.

Execution Steps

Directly execute the Main Class.

Team Member 

Shivam Bahedia, Sourabh Poddar, Yamini Punetha

snlpminiproject's People

Contributors

sourabhpoddar404 avatar yamini19 avatar shivam-bahedia avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.