Python Developer – Transition Repetition Analysis Module

120
ETH, DAI, USDT
+53
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
+53
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
Converting Images to word document

We are looking for a freelancer who can convert images into a Word file (PDF format).The task involves extracting text from images and accurately typing it into a Word document.The freelancer should have excellent typing...

Logo designing

Making logo design in less than 30 minutes, with different styles and text font. For example : 3d, Vintage, Luksus, Monogram and more.

Growth Marketing Manager

We're looking for a Growth Marketing Manager to help us scale our product. If you love data, experiments, and driving results — you might be the one! What you’ll do: Develop and execute end-to-end growth...

Full-Stack Developer for crypto website

Your profile: Strong skills in Vue2.js and React (front-end + admin dashboards). Comfortable working full-stack. Experience in crypto projects & solidity Familiar with staking, yield, APR, earn mechanics. Scope: Add new features and improvements to...

I am looking for someone to manage my Telegram group

We are looking for a skilled individual to manage our Telegram group for a 7-day project. As the Telegram Group Manager, you will be responsible for overseeing the group, engaging with members, and ensuring the...

Expert creative designer using artificial intelligence tools

creative designerCreative designer specializing in branding, motion graphics, and smart inspection solutions with modern, digital design using artificial intelligence tools.

Web developer

Responsibilities:Identify and resolve website errors (loading issues, error messages, broken sliders, stacked elements).Restore proper functionality of testimonials, graphics, and interactive features.Optimize the website for smooth performance across devices and browsers.Ensure the site is stable, secure,...

Mobile App Developer (Android & iOS)

We are looking for an experienced Mobile App Developer to create a mobile version of our VPN service for Android and iOS. The app should provide users with a secure, fast, and user-friendly experience.

Mobile App Developer

A mobile version of the existing desktop VPN application needs to be developed. The main goal is to transfer key functionality (connection to servers, country selection, subscription management) to iOS and Android mobile platforms. The...

Native American voice actors

We are looking for native American voice actors (both female and male, aged 35-40) who are comfortable on camera to reading and performing short scripts in a clear, engaging, and natural way.Requirements:Filming yourself while reading...

Converting Images to word document

We are looking for a freelancer who can convert images into a Word file (PDF format).The task involves extracting text from images and accurately typing it into a Word document.The freelancer should have excellent typing...

Logo designing

Making logo design in less than 30 minutes, with different styles and text font. For example : 3d, Vintage, Luksus, Monogram and more.

Growth Marketing Manager

We're looking for a Growth Marketing Manager to help us scale our product. If you love data, experiments, and driving results — you might be the one! What you’ll do: Develop and execute end-to-end growth...

Full-Stack Developer for crypto website

Your profile: Strong skills in Vue2.js and React (front-end + admin dashboards). Comfortable working full-stack. Experience in crypto projects & solidity Familiar with staking, yield, APR, earn mechanics. Scope: Add new features and improvements to...

I am looking for someone to manage my Telegram group

We are looking for a skilled individual to manage our Telegram group for a 7-day project. As the Telegram Group Manager, you will be responsible for overseeing the group, engaging with members, and ensuring the...

Expert creative designer using artificial intelligence tools

creative designerCreative designer specializing in branding, motion graphics, and smart inspection solutions with modern, digital design using artificial intelligence tools.

Web developer

Responsibilities:Identify and resolve website errors (loading issues, error messages, broken sliders, stacked elements).Restore proper functionality of testimonials, graphics, and interactive features.Optimize the website for smooth performance across devices and browsers.Ensure the site is stable, secure,...

Mobile App Developer (Android & iOS)

We are looking for an experienced Mobile App Developer to create a mobile version of our VPN service for Android and iOS. The app should provide users with a secure, fast, and user-friendly experience.

Mobile App Developer

A mobile version of the existing desktop VPN application needs to be developed. The main goal is to transfer key functionality (connection to servers, country selection, subscription management) to iOS and Android mobile platforms. The...

Native American voice actors

We are looking for native American voice actors (both female and male, aged 35-40) who are comfortable on camera to reading and performing short scripts in a clear, engaging, and natural way.Requirements:Filming yourself while reading...