{"id":15304557,"url":"https://github.com/monkeymars/php-nlp-tools","last_synced_at":"2025-10-08T09:30:48.980Z","repository":{"id":10377701,"uuid":"12522807","full_name":"monkeymars/php-nlp-tools","owner":"monkeymars","description":"Natural Language Processing Tools in PHP","archived":false,"fork":true,"pushed_at":"2013-08-27T21:13:51.000Z","size":460,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-02T07:56:58.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"angeloskath/php-nlp-tools","license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monkeymars.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-01T15:48:57.000Z","updated_at":"2013-09-01T15:48:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/monkeymars/php-nlp-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Fphp-nlp-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Fphp-nlp-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Fphp-nlp-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Fphp-nlp-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkeymars","download_url":"https://codeload.github.com/monkeymars/php-nlp-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235700110,"owners_count":19031668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T07:56:59.042Z","updated_at":"2025-10-08T09:30:43.441Z","avatar_url":"https://github.com/monkeymars.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[PHP NlpTools](http://php-nlp-tools.com/)\n=============\n\nNlpTools is a set of php 5.3+ classes for beginner to\nsemi advanced natural language processing work.\n\nDocumentation\n-------------\n\nYou can find documentation and code examples at the project's [homepage](http://php-nlp-tools.com/documentation/).\n\nContents\n---------\n\n### Classification Models ###\n\n1. [Multinomial Naive Bayes](http://php-nlp-tools.com/documentation/bayesian-model.html)\n2. [Maximum Entropy (Conditional Exponential model)](http://php-nlp-tools.com/documentation/maximum-entropy-model.html)\n\n### Topic Modeling ###\n\nLda is still experimental and quite slow but it works. [See an example](http://php-nlp-tools.com/posts/introducing-latent-dirichlet-allocation.html).\n\n1. [Latent Dirichlet Allocation](http://php-nlp-tools.com/documentation/api/#NlpTools/Models/Lda)\n\n### Clustering ###\n\nHierarchical and Expectations Maximization are coming soon.\n\n1. [K-Means](http://php-nlp-tools.com/documentation/clustering.html)\n\n### Tokenizers ###\n\n1. [WhitespaceTokenizer](http://php-nlp-tools.com/documentation/api/#NlpTools/Tokenizers/WhitespaceTokenizer)\n2. [WhitespaceAndPunctuationTokenizer](http://php-nlp-tools.com/documentation/api/#NlpTools/Tokenizers/WhitespaceAndPunctuationTokenizer)\n3. [ClassifierBasedTokenizer](http://php-nlp-tools.com/documentation/api/#NlpTools/Tokenizers/ClassifierBasedTokenizer)\n   This tokenizer allows us to build a lot more complex tokenizers\n   than the previous ones\n\n### Documents ###\n\n1. [TokensDocument](http://php-nlp-tools.com/documentation/api/#NlpTools/Documents/TokensDocument)\n   represents a bag of words model for a document.\n2. [WordDocument](http://php-nlp-tools.com/documentation/api/#NlpTools/Documents/WordDocument)\n   represents a single word with the context of a larger document.\n3. [TrainingDocument](http://php-nlp-tools.com/documentation/api/#NlpTools/Documents/TrainingDocument)\n   represents a document whose class is known.\n4. [TrainingSet](http://php-nlp-tools.com/documentation/api/#NlpTools/Documents/TrainingSet)\n   a collection of TrainingDocuments\n\n### Feature factories ###\n\n1. [FunctionFeatures](http://php-nlp-tools.com/documentation/api/#NlpTools/FeatureFactories/FunctionFeatures)\n   Allows the creation of a feature factory from a number of callables\n2. [DataAsFeatures](http://php-nlp-tools.com/documentation/api/#NlpTools/FeatureFactories/DataAsFeatures)\n   Simply return the data as features.\n\n### Similarity ###\n\n1. [Jaccard Index](http://php-nlp-tools.com/documentation/api/#NlpTools/Similarity/JaccardIndex)\n2. [Cosine similarity](http://php-nlp-tools.com/documentation/api/#NlpTools/Similarity/CosineSimilarity)\n3. [Simhash](http://php-nlp-tools.com/documentation/api/#NlpTools/Similarity/Simhash)\n4. [Euclidean](http://php-nlp-tools.com/documentation/api/#NlpTools/Similarity/Euclidean)\n5. [HammingDistance](http://php-nlp-tools.com/documentation/api/#NlpTools/Similarity/HammingDistance)\n\n### Stemmers ###\n\n1. [PorterStemmer](http://php-nlp-tools.com/documentation/api/#NlpTools/Stemmers/PorterStemmer)\n2. [RegexStemmer](http://php-nlp-tools.com/documentation/api/#NlpTools/Stemmers/RegexStemmer)\n\n### Optimizers (MaxEnt only) ###\n\n1. [A gradient descent optimizer](http://php-nlp-tools.com/documentation/api/#NlpTools/Optimizers/MaxentGradientDescent)\n   (written in php) for educational use.\n   It is a simple implementation for anyone wanting to know a bit\n   more about either GD or MaxEnt models\n2. A fast (faster than nltk-scipy), parallel gradient descent\n   optimizer written in [Go](http://golang.org/). This optimizer\n   resides in another [repo](https://github.com/angeloskath/nlp-maxent-optimizer),\n   it is used via the [external optimizer](http://php-nlp-tools.com/documentation/api/#NlpTools/Optimizers/ExternalMaxentOptimizer).\n   TODO: At least write a readme for the optimizer written in Go.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkeymars%2Fphp-nlp-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonkeymars%2Fphp-nlp-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkeymars%2Fphp-nlp-tools/lists"}