CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-chardet

Character encoding detector for automatic detection of text encodings using occurrence analysis

84

0.98x
Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well the engineer uses the chardet package to implement synchronous file encoding detection. The focus is on proper usage of chardet's detectFileSync API and correct handling of its return values.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses detectFileSync",
      "description": "Uses chardet.detectFileSync() function to detect file encodings synchronously",
      "max_score": 40
    },
    {
      "name": "Correct file paths",
      "description": "Passes complete file paths (not just filenames) to detectFileSync()",
      "max_score": 15
    },
    {
      "name": "Handles null returns",
      "description": "Correctly handles when detectFileSync() returns null by setting encoding to 'unknown' and status to 'fail'",
      "max_score": 25
    },
    {
      "name": "Handles successful detection",
      "description": "Correctly handles when detectFileSync() returns an encoding string by setting it as the encoding value and status to 'pass'",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-chardet

tile.json