PHP Classes

File: backend/runNGramProcessor.php

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Modelo LLM PHP   backend/runNGramProcessor.php   Download  
File: backend/runNGramProcessor.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Modelo LLM PHP
Large language model to implement a chat bot
Author: By
Last change:
Date: Yesterday
Size: 283 bytes
 

Contents

Class file image Download
<?php
require 'vendor/autoload.php';

use
Chat\X\Utils\NGramProcessor;

$jsonPath = 'dados_processados.json';
$outputPath = 'ngrams.json';
$n = 3;

$ngramProcessor = new NGramProcessor($jsonPath, $n);
$ngramProcessor->process();
$ngramProcessor->saveFrequencies($outputPath, 20478);