Ratings | | Unique User Downloads | | Download Rankings |
Not yet rated by the users | | Total: 92 | | All time: 9,918 This week: 673 |
|
Description | | Author |
This package can parse sentences and extract their word features.
It takes a string of text and parses it to split several parts that are easier to analyze. Currently, it can:
- Break the string into sentence paragraphs
- Parse a sentence punctuation
- Find the frequency of work in a sentence
- Return a SQL string to insert words in a database table
- Rate a sentence according to the words that it uses
- Etc Innovation Award
October 2021
Number 10 |
Natural language processing is helpful to interpret phrases of users that wish to express their will using written or spoken language.
It is necessary to process a phrase to interpret its meaning. The interpretation of the phrase can start by breaking it into several parts that make it easier to interpret the meaning of each part of the phrase.
This package can parse phrases to make it easier to process them and interpret the meaning of the phrase as a whole.
Manuel Lemos |
| |
|
|
Innovation award
Nominee: 1x |
|
Example
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Sentence</title>
<link href="css/style.css" type="text/css" rel="stylesheet" rev="stylesheet" media="all">
</head>
<body>
<h1>Sentence</h1>
<h2>Add a sentence or group of sentences in the text box to see the parts of your sentences.</h2>
<form name="sentence" method="get" action="index.php">
<textarea name="add_sentence" class="sentence" value=""></textarea>
<input type="submit" name="submit" value="Add">
</form>
<!-- Result -->
<pre>
</pre>
</body>
</html>
<?php
echo '<pre>';
print_r($_GET);
if(isset($_GET['add_sentence']))
{
$sentence = $_GET['add_sentence'];
}else{
$sentence = "This is a book, and I love it! Minerba got it for me. Que maravilla! It's the best that could happen to me.";
}
// put your code here
require_once("./Upload.php");
//require_once("./language/Words.php");
require_once("./language/SentenceElements.php");
require_once("./language/WordRating.php");
$r = new WordRating();
$b = new SentenceElements();
//print_r($b->bindElements($sentence));
$sentences = $b->brakeParagraph($sentence);
foreach($sentences as $value)
{
print_r($b->sentenceBinder($value));
}
$b->parsePunctuation($sentence);
$r->setWordIntensity();
$r->findFrequency("love");
$r->setWordFrequency("love");
var_dummp($r->getWordFrequency());
var_dump($r->getWordIntensity());
echo "<pre>";
$word = new Words();
$alphabet = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
print $word->insertWords();
//var_dump($r);
?>
|
Details
Language: Sentence: Word Detection
Sentence parts, and words identification
Here are a few classes not yet related identifying the parts of a sentence, another accepts words and organize
them into subject and predicative and later into sentence.
The current stage for this project is Alpha.
<img src="https://raw.githubusercontent.com/gmanon/language/sentence/sentence/language_data/sentence_elements_finder.png" alt="language-sec:sentence element finder">
<h2>Sentence Builder class</h2>
Sentence Builder builds sentences from given words. It would work together with the sentence elements filter. Once you have gother random words, you will pass it to sentence builder to build an organized sentence.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.