How irvallensar/engagement-analyzer-llm works
Engagement Analyzer combines a corpus-annotation construction workflow with experiments for token-level engagement extraction. The repository supports sentence preparation, annotation-batch generation, WebAnno formatting, context expansion, post-annotation processing and reliability analysis; its newer experiments add discriminative sequence tagging, synthetic-data workflows, candidate spans and structured LLM extraction. The older construction scripts and newer experiments are not shown as one continuous runtime pipeline. Several research capabilities are documented in the README but their implementations were not sampled, so those links are documented or left unverified.
Main entry points: making_annotation_file.py Annotation file generation · make_corpus_batches.py Corpus batching · add_contextTosentences.py Context expansion · mutlisentToConll2.py Context TSV export
Components 22
Corpus preparation
- Sentence tokenization
Engagement-Discourse-Treebank-Construction/01_sentence_tokenization - Sentence IDs
Engagement-Discourse-Treebank-Construction/02_sentence_id_extraction - Corpus batching
Engagement-Discourse-Treebank-Construction/03_batching/make_corpus_batches.py - Batch utility
Engagement-Discourse-Treebank-Construction/scr/utils.py
Annotation workflow
- Annotation file generation
Engagement-Discourse-Treebank-Construction/04_annotation_file_generation/making_annotation_file.py - Context expansion
Engagement-Discourse-Treebank-Construction/05_context_window_extraction/add_contextTosentences.py - Context TSV export
Engagement-Discourse-Treebank-Construction/05_context_window_extraction/mutlisentToConll2.py - Construction samples
Engagement-Discourse-Treebank-Construction/construction_specific_samples/scripts/making_annotation_file3.py - WebAnno annotation files
Post-annotation
- Annotated TSV integration
Engagement-Discourse-Treebank-Construction/06_post_annotation/tsv_related/integrate_annotated.py - TSV conversion and folds
Engagement-Discourse-Treebank-Construction/06_post_annotation/post_process - Annotation reliability
Engagement-Discourse-Treebank-Construction/06_post_annotation/reliability/accuracy_calculator.py
Extraction research
- Training data
convert_iob_to_jsonl.py - Discriminative tagging
scripts - Synthetic data workflows
scripts - Candidate spans
suggester/custom_suggester.py - Candidate tuple adapter
scripts/candidate_llm_pipeline.py - Structured LLM extraction
scripts/local_llm_client_4.py - Extraction evaluation
scripts/evaluate_iob.py
Other components
- Researcher / annotator
- Text corpora
- Engagement span results
Connections 27
- Text corpora → Sentence tokenization: segments
README.md - Sentence tokenization → Sentence IDs: identifies
README.md - Sentence IDs → Corpus batching: selects for batches
README.md - Corpus batching → Batch utility: uses
Engagement-Discourse-Treebank-Construction/03_batching/make_corpus_batches.py - Corpus batching → Annotation file generation: prepares for annotation
README.md - Annotation file generation → Batch utility: batches with
Engagement-Discourse-Treebank-Construction/04_annotation_file_generation/making_annotation_file.py - Annotation file generation → WebAnno annotation files: writes
Engagement-Discourse-Treebank-Construction/04_annotation_file_generation/making_annotation_file.py - Researcher / annotator → WebAnno annotation files: annotates
README.md - Annotation file generation → Context expansion: provides sentence context
README.md - Context expansion → Batch utility: batches with
Engagement-Discourse-Treebank-Construction/05_context_window_extraction/add_contextTosentences.py - Context expansion → Context TSV export: exports contextual batches
README.md - Context TSV export → Construction samples: imports formatting helpers
Engagement-Discourse-Treebank-Construction/05_context_window_extraction/mutlisentToConll2.py - Context TSV export → WebAnno annotation files: writes
Engagement-Discourse-Treebank-Construction/05_context_window_extraction/mutlisentToConll2.py - WebAnno annotation files → Annotated TSV integration: integrates annotations
README.md - Annotated TSV integration → TSV conversion and folds: converts and partitions
README.md - Annotated TSV integration → Annotation reliability: supports agreement analysis
README.md - TSV conversion and folds → Training data: formats training data
README.md - Training data → Discriminative tagging: trains token taggers
README.md - Training data → Synthetic data workflows: augments data
README.md - Researcher / annotator → Candidate spans: submits text
- Candidate spans → Candidate tuple adapter: supplies candidates
scripts/candidate_llm_pipeline.py - Candidate tuple adapter → Engagement span results: returns span tuples
scripts/candidate_llm_pipeline.py - Researcher / annotator → Structured LLM extraction: provides prompt
- Structured LLM extraction → Engagement span results: generates structured spans
scripts/local_llm_client_4.py - Discriminative tagging → Extraction evaluation: evaluates predictions
README.md - Structured LLM extraction → Extraction evaluation: benchmarks extraction
README.md - Extraction evaluation → Engagement span results: scores spans
README.md