Generate Random Sentence [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I want to create random sentences. I can't create any lists or populate anything myself. I will end up asking questions that analyze the sentence's words.
I don't understand how to use PHP to arrange verbs and nouns to create complete sentences.
I'm not asking for an external reference, just how to use PHP to generate random sentences.
Is it possible to grab a sentence of a web page and test to see if it is grammatically correct?
Thanks!

On this site you will get your wordlists. If you separately load them into your database, you can save the part of speech too.
Simple english grammar helps you building the sentence ;)
Oh, I'm sorry. Did not read that you want meaningful sentences.
You can use the tips above to check the grammar of the sentences too ;)

Related

An Algorithm/PHP code for word finding game [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Well, I recently have been trying to come with code to create matrix in which word hunting can be done. I want the user to initialise rows, columns and of course give the words, it is too difficult to create such code/algorithm as the words can be placed vertically, horizontally or diagonally. I also tried google for such algorithms but without any luck. So, if anyone has an algorthm in mind or has written such PHP code, itll be really great if I can see that.
Thanks in Advance,
Nalin Bhardwaj
I am so sorry , I posted this question here, as suggested by one of the users, I googled a few different things online an dhave found a ruby file which has been built for the same purpose. And , if anybody would like to access it, they may check it out online at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/298382 . And, now I have decided to use this algorithm itself to create such a PHP file. Thank you everybody, for suggestions

PHP duplicate content detection system [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Are there any popular PHP libraries or services that can help detect duplicate content?
I run a site that has user generated content and I want to detect content that are similar or duplicated. Are there any popular libraries out there that can help with this?
Text similarity/plagiat/duplicate is a big topic. There are so many algos and solutions.
Some projects use the "adaptive local alignment of keywords" (you will find info on that on google.)
Also, you can check this (Check the 3 links in the answer, very instructive):
Cosine similarity vs Hamming distance
Hope this will help.

Is there a PHP library for parsing gettext PO POT files? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
if is not in PHP, is possible use some command line tools which convert PO file into some structured format e.g. XML or some other which I can simple process in PHP?
Update: As of 2018/05, the best options are:
https://github.com/oscarotero/Gettext
https://symfony.com/doc/current/components/translation.html
https://docs.zendframework.com/zend-i18n/translation/
See http://www.phptherightway.com#i18n_l10n_title
There are some:
https://github.com/jyxo/php/tree/master/Jyxo/Gettext
https://github.com/clinisbut/PHP-po-parser
http://code.google.com/p/php-po-parser/
http://pear.php.net/package/File_Gettext/redirected
http://drupalcode.org/project/drupal.git/tree/HEAD:/core/lib/Drupal/Component/Gettext
The last one is part of Drupal, and it's probably the most maintained.
Some simple regular expressions will allow you to parse .PO/.POT files. I did a similar thing recently. Take the following regex from a script I have recently written:
$poMsgIdAndMsgStrRegex = '/^#\s*(.+?)\nmsgid "(.+?)"\nmsgstr "(.+?)"/m';
This does only capture the final comment line but it has so far been suitable for my purposes. You may need to adapt it.
Anyway, you can use the above regex with preg_match_all() to capture all MsgId and MsgStr strings into an array of matches. Once you have the array then you can put it into any format you wish.
There may be libraries for doing this but I have not seen any.
Edit: You may also want to check out the PHP class for converting.po files .mo format that is referred to in the 'possible duplicate' comment. It doesn't sound like it will solve your problem (since you want to convert .po files to XML), but it is worth examining anyway. It helped me a lot.

Manage Tags for entries of the website with JS and PHP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
In my webiste, I classify all my entries by categories, wich its becoming a little confusing as I have like 3.000 entries now.
so, I need to implement tags.
I know all the website use them now, wordpress and everything.. I have been google'ing for a real while... is there a built in script (or almost) to manage tags? (insert tags, list tags, top tags,.)
I mean, there has to be any utility that can help me with this.. do you know any?
you haven't found a script probably because using tags is quite simple :)
I have implemented tags into one of my projects using the "Scuttle" solution in the next link:
http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html
Hope this helps...
Treat your categories as tags now.
If your categories are not poly-hierarchical, then consider making them so.
(eg an article could appear in more than one category)

Microsoft Word to HTML in PHP script [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I want to know the PHP code for Word to HTML conversion. When we retrive the Word document from the database and display in the frontend, the Word document should display as HTML page.
wvware
I don't completly understand your request but I think you can try TinyMCE for PHP, it's a Web based Wysiwyg editor, where all you type and format will be saved as HTML code, you can even paste and convert Word documents.
So like symcbean said, the best way to do is wvWare, otherwise,you could hardcode a class yourself, but it will be a difficult path.

Categories