Complex Event Extraction

repository·master·Indexed 23 days ago

https://github.com/liuhuanyong/complexeventextraction

A project for extracting Chinese compound events—including causal, conditional, sequential, and reversal events—to construct Event Graphs (Logic Graphs). It identifies event relationships through complex sentence structures and provides various representation methods using short sentences, word sequences, and phrases.

Tokens
1.1K
Snippets
1
Records
4
Agent score
29%

What's inside complexeventextraction

  1. Overview of Complex Event Extraction

    master
    ComplexEventExtraction is a project focused on Chinese compound event extraction. It identifies various types of events within Chinese text—such as conditional, causal, sequential, and reversal events—and organizes them into an Event Graph (also known as a Logic Graph or 事理图谱). The project leverages the fact that Chinese compound events are explicitly expressed through complex sentence structures.
  2. Understand Event Representation Methods

    master

    The project discusses three ways to represent events (using a causal event as an example: "African swine fever recently, leading to domestic pork price increases"):

    1. Short Sentences (短句): Uses Chinese punctuation as boundaries (e.g., 这几天非洲闹猪瘟&国内猪肉涨价).
      • Pros: Easy, uses original information.
      • Cons: High noise, difficult to fuse.
    2. Word Sequences (词序列): Performs word segmentation, POS tagging, and stop-word removal (e.g., 非洲闹猪瘟&国内猪肉涨价).
      • Pros: Richer semantics, shorter than sentences.
      • Cons: Stop-word rules are hard to control.
    3. Phrases (短语): Uses dependency parsing or semantic role labeling to form subject-predicate or verb-object phrases (e.g., 非洲闹猪瘟&猪肉涨价).
      • Pros: Semantically condensed and concise.
      • Cons: Limited by the performance of dependency/semantic role parsers.
  3. Understand Event Graph (Logic Graph) Types

    master

    The project categorizes events into four primary types based on their logical relationship and application:

    Event TypeMeaningFormalizationApplicationGraph Scenario
    Causal Event (因果事件)One event leads to anotherA leads to BEvent warningCausal tracing (finding cause from effect)
    Conditional Event (条件事件)One event occurs under certain conditionsIf A, then BEvent warningTiming determination
    Reversal Event (反转事件)Two events are in oppositionAlthough A, but BRisk preventionNegative examples
    Sequential Event (顺承事件)One event follows anotherA followed by BEvent evolutionFuture intent recognition
  4. Reference patterns for Reversal Events in complex_sentence.py

    master

    The project uses complex_sentence.py to define patterns for identifying event relationships. Below is the implementation of the pattern_but method which identifies reversal (but) patterns using specific word pairings:

        '''转折事件'''
        def pattern_but(self):
            wds = [[['与其'], ['不如'],'but'],
                    [['虽然','尽管','虽'],['但也','但还','但却','但'],'but'],
                    [['虽然','尽管','虽'],[ '但','但是也','但是还','但是却',],'but'],
                    [['不是'],['而是'],'but'],
                    [['即使','就算是'],['也','还'],'but'],
                    [['即便'],['也','还'],'but'],
                    [['虽然','即使'],['但是','可是','然而','仍然','还是','也', '但'],'but'],
                    [['虽然','尽管','固然'],['也','还','却'],'but'],
                    [['与其','宁可'],['决不','也不','也要'],'but'],
                    [['与其','宁肯'],['决不','也要','也不'],'but'],
                    [['与其','宁愿'],['也不','决不','也要'],'but'],
                    [['虽然','尽管','固然'],['也','还','却'],'but'],
                    [['不管','不论','无论','即使'],['都', '也', '总', '始终', '一直'],'but'],
                    [['虽'],['可是','倒','但','可','却','还是','但是'],'but'],
                    [['虽然','纵然','即使'],['倒','还是','但是','但','可是','可','却'],'but'],
                    [['虽说'],['还是','但','但是','可是','可','却'],'but'],
                    [['无论'],['都','也','还','仍然','总','始终','一直'],'but'],
                    [['与其'],['宁可','不如','宁肯','宁愿'],'but']
        ```
    
    '''转折事件'''
        def pattern_but(self):
            wds = [[['与其'], ['不如'],'but'],
                    [['虽然','尽管','虽'],['但也','但还','但却','但'],'but'],
                    [['虽然','尽管','虽'],[ '但','但是也','但是还','但是却',],'but'],
                    [['不是'],['而是'],'but'],
                    [['即使','就算是'],['也','还'],'but'],
                    [['即便'],['也','还'],'but'],
                    [['虽然','即使'],['但是','可是','然而','仍然','还是','也', '但'],'but'],
                    [['虽然','尽管','固然'],['也','还','却'],'but'],
                    [['与其','宁可'],['决不','也不','也要'],'but'],
                    [['与其','宁肯'],['决不','也要','也不'],'but'],
                    [['与其','宁愿'],['也不','决不','也要'],'but'],
                    [['虽然','尽管','固然'],['也','还','却'],'but'],
                    [['不管','不论','无论','即使'],['都', '也', '总', '始终', '一直'],'but'],
                    [['虽'],['可是','倒','但','可','却','还是','但是'],'but'],
                    [['虽然','纵然','即使'],['倒','还是','但是','但','可是','可','却'],'but'],
                    [['虽说'],['还是','但','但是','可是','可','却'],'but'],
                    [['无论'],['都','也','还','仍然','总','始终','一直'],'but'],
                    [['与其'],['宁可','不如','宁肯','宁愿'],'but']