Git Product home page Git Product logo

master_thesis's Introduction

Optimizing Domain-specific Regulation Comparison with Semantic Text Matching & Relation Extraction

Introduction

This repository is for the source codes of master thesis: "Optimizing Domain-specific Regulation Comparison with Semantic Text Matching & Relation Extraction", the goals of which is to examine the potential for Natural Language Processing technologies to optimize current manual regulation maintenance process in an automotive manufacturer enterprise and proposes concepts of architecture and implementation of a text-matching as well as a relation extraction mechanism that integrates entity recognition to extract key information that is interested by experts from the regulations that could accelerate the manual information processes.

The source codes consists of following two parts:

Part 1: Paragraph Matching

The directory includes following files:

  • main
    • CorpusGenerator.py
    • config
      • config.yml
    • trained models
    • para_similarity.py
    • TW_EU_tf_idf.py
    • TW_EU_LSI.py
    • TW_EU_w2v.py
    • TW_EU_d2v.py
    • Evaluate.py
    • evaluation_plot.ipynb

user guide:

Paragraph matching mechanism supports four alternive text representation approaches:

  1. TF-IDF
  2. LSI
  3. word2vec
  4. doc2vec

correspondent configurations can be done under config YAML file in config directory. Supported Configuations include:

  1. File location
  2. data folder
  3. document pairing file folder
  4. result output folder
  5. groud truth folder
  6. list of approaches that need to be generated in one execution
  7. Preprocessing approaches (boolean values)
  8. bigram / trigram
  9. porter stemming / wordnet lemmatization
  10. Modeling For each approach:
  11. parameters
  12. similarity metrics 1. cosine similarity 2. word mover distance
  13. if the embedding needs to be pretrained

an example can be seen under example config


Part 2: Relation Extraction

modelling of relation extration consists of following steps:

  1. Recognition of defined "Quantitative Value" Entity: pretrained customized SpaCy model under "ner" folder
  2. extraction of tokens with "noun" as Part of Speech under same tree in dependency parsing with named entity in the last step and pairing with named entity
  3. classification of above entity pairs into four defined classes: MinValue, MaxValue, IsValue, NoRelation

The architecture is summarized as follow:

A model consisting of BERT embedding and Bi-LSTM is trained by train.py by calling help functions in Relation_Extraction.py Demo is available at [example config](relation_extraction/Relation Extraction.ipynb)

master_thesis's People

Contributors

sitongye avatar

Stargazers

 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.