Python Developer – Transition Repetition Analysis Module

120
ETH, DAI, USDT
+55
0 days (till May 25th, 2025)

Milestone 1 – Linguistic QA Validator (French Transition Rules)

🎯 Objective

Develop a Python module to validate batches of AI-generated French transition phrases. This module ensures:
1. No stylistically significant word repetition across transitions in a group
2. “Enfin” is used only in the final transition of each group
3. Grammatical stopwords (like "le", "de", "à", "et") are excluded from repetition checks

📁 Module Target

File: utils/validate_prompt_compliance.py

📚 Definitions

✅ "Repetition" Violation

Flag repeated meaningful words in a group of transitions.
Use a French stopword list to ignore non-stylistic words such as:
["le", "la", "les", "de", "des", "un", "une", "à", "et", "en", "du", "par", "que", "si", "ce", "sur"]

🛑 "Enfin" Misuse

Flag if “enfin” appears in any position other than the last transition in a group.

🧩 Required Functions

tokenize(text: str) -> List[str]: Normalize case, remove punctuation, return word tokens

check_transition_group(transitions: List[str]) -> Dict:
Example return:
{
  "repetition": ["par", "direction"],
  "enfin_misplaced": True
}

validate_batch(batch_outputs: List[List[str]]) -> Dict: Returns summary of violations and per-output breakdown

📤 Output Format (Example)

{
  "total_outputs": 5,
  "outputs_with_violations": 4,
  "violations_summary": {
    "repetition": {
      "count": 3,
      "affected_outputs": [1, 2, 4],
      "violated_words": ["par", "direction", "dans"]
    },
    "enfin_misplaced": {
      "count": 1,
      "affected_outputs": [3]
    }
  },
  "details": [
    {
      "output_id": 1,
      "transitions": ["Par ailleurs,", "Par contre,", "Par exemple,"],
      "violations": {"repetition": ["par"]}
    },
    {
      "output_id": 2,
      "transitions": ["Prenons la direction de Paris,", "Ensuite, prenons la direction de Lyon,", "Enfin, une note sur Marseille"],
      "violations": {"repetition": ["prenons", "direction"]}
    },
    {
      "output_id": 3,
      "transitions": ["Enfin, une annonce importante", "Puis une autre nouvelle", "Pour conclure,"],
      "violations": {"enfin_misplaced": true}
    },
    {
      "output_id": 4,
      "transitions": ["Dans un autre registre,", "Dans la même région,", "Encore dans le domaine économique,"],
      "violations": {"repetition": ["dans"]}
    },
    {
      "output_id": 5,
      "transitions": ["À noter également,", "Nous terminons avec cette info :", "Pour finir,"],
      "violations": {}
    }
  ]
}

✅ Completion Criteria

- tokenize() correctly splits and lowercases all transition text
- Repetition logic excludes stopwords
- enfin_misplaced triggers only when “enfin” is not last
- All outputs match the JSON schema above
- Module is testable and cleanly structured

🧠 Skills Required

- Python 3
- Regex and tokenization
- Set logic and dictionaries
- JSON formatting
- NLP or editorial QA experience (preferred)

120
ETH, DAI, USDT
+55
0 days (till May 25th, 2025)

More Jobs from this customer

🧾 Extract Structured Transition Triplets from DOCX Files

We are hiring a developer to build a Streamlit application that extracts structured examples of transition phrases from .docx documents containing regional French news articles. These transitions are short, context-appropriate phrases that connect ideas between...

🧾 Extract Structured Transition Triplets from DOCX Files

We are hiring a developer to build a Streamlit application that extracts structured examples of transition phrases from .docx documents containing regional French news articles. These transitions are short, context-appropriate phrases that connect ideas between...

More Jobs like this

Show more
SEO & Web Traffic Specialist

i'm seeking a skilled SEO web traffic expert who can increase sales in my store within 7 days. this is a performance based job, if you do not achieve the agreed traffic growth within the...

German Expert Translators Needed

Are you a language enthusiast with a passion for precision and professionalism? We are on the lookout for top-tier translators to help us bring important documents to life in German.   We need highly skilled...

Virtual assistant Spanish

Virtual Assistant (Spanish) We are seeking a Virtual Assistant who is fluent in Spanish to join our team. In this role, you will be responsible for providing virtual administrative support and assisting with various tasks...

quick creation of Instagram campaign

I need to sponsor two Instagram posts already existing. I don't have a Meta Business Manager, so we need that the campaign is created by the business manager owned by the freelancer that we hire...

Develop an adroid App in Firebase Studio

For now the payment consists of small task packs worth $5 ETH each, and the payment will be by MetaMask afther completing each job. Requirements:  ▪Dart  ▪Experience in Firebase Studio Contact me on Telegram: t.me/LesterRF Please...

second sell

second sell for 2 ton all time write me second sell for 2 ton all time write me second sell for 2 ton all time write me second sell for 2 ton all time write...

English to Spanish Translation with Design Maintenance

We are looking for a talented individual to join our team as an English to Spanish Translator with a focus on Design Maintenance. As part of this role, you will be responsible for translating various...

Selling 41B $Seconds 10$ PER B

you can contact me in telegram : rareape to make a faster transac thanks

English to Japanese Translator Needed

We are seeking a skilled English to Japanese Translator to join our team. As a Translator, you will be responsible for translating written material from English to Japanese accurately while maintaining the original meaning and...

I need a wallet drainer for SOL and ETH.

من به یک ابزار کیف پول Solana نیاز دارم که امضای کاربر را به گونه‌ای دریافت کند که کاربر متوجه این یک امضا برای کسر موجودی Solana است. این ابزار باید امضا را به صورت...

SEO & Web Traffic Specialist

i'm seeking a skilled SEO web traffic expert who can increase sales in my store within 7 days. this is a performance based job, if you do not achieve the agreed traffic growth within the...

German Expert Translators Needed

Are you a language enthusiast with a passion for precision and professionalism? We are on the lookout for top-tier translators to help us bring important documents to life in German.   We need highly skilled...

Virtual assistant Spanish

Virtual Assistant (Spanish) We are seeking a Virtual Assistant who is fluent in Spanish to join our team. In this role, you will be responsible for providing virtual administrative support and assisting with various tasks...

quick creation of Instagram campaign

I need to sponsor two Instagram posts already existing. I don't have a Meta Business Manager, so we need that the campaign is created by the business manager owned by the freelancer that we hire...

Develop an adroid App in Firebase Studio

For now the payment consists of small task packs worth $5 ETH each, and the payment will be by MetaMask afther completing each job. Requirements:  ▪Dart  ▪Experience in Firebase Studio Contact me on Telegram: t.me/LesterRF Please...

second sell

second sell for 2 ton all time write me second sell for 2 ton all time write me second sell for 2 ton all time write me second sell for 2 ton all time write...

English to Spanish Translation with Design Maintenance

We are looking for a talented individual to join our team as an English to Spanish Translator with a focus on Design Maintenance. As part of this role, you will be responsible for translating various...

Selling 41B $Seconds 10$ PER B

you can contact me in telegram : rareape to make a faster transac thanks

English to Japanese Translator Needed

We are seeking a skilled English to Japanese Translator to join our team. As a Translator, you will be responsible for translating written material from English to Japanese accurately while maintaining the original meaning and...

I need a wallet drainer for SOL and ETH.

من به یک ابزار کیف پول Solana نیاز دارم که امضای کاربر را به گونه‌ای دریافت کند که کاربر متوجه این یک امضا برای کسر موجودی Solana است. این ابزار باید امضا را به صورت...