https://github.com/shamil8/task-similarity
Finds degree of similarity between two tasks.
https://github.com/shamil8/task-similarity
js json similarity string
Last synced: about 2 months ago
JSON representation
Finds degree of similarity between two tasks.
- Host: GitHub
- URL: https://github.com/shamil8/task-similarity
- Owner: shamil8
- Created: 2020-11-26T04:12:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-04T10:15:20.000Z (over 5 years ago)
- Last Synced: 2025-10-24T02:56:26.106Z (8 months ago)
- Topics: js, json, similarity, string
- Language: JavaScript
- Homepage:
- Size: 413 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Similarity between two tasks
In your code:
```javascript
import { taskRatingsWithProbability, taskSimilarity } from './logic/taskAlgorithm.js'
const taskSimilarityWithoutAdapt = taskSimilarity('Пересчитать расходы', .7)
console.log('taskSimilarityWithoutAdapt', taskSimilarityWithoutAdapt)
const taskRatings = taskRatingsWithProbability('Пересчитать расходы', .5, .3) // with minPV and minCount, if we have too little tasks
console.log('taskRatings', taskRatings)
const taskRatingsOneHundred = taskRatingsWithProbability('Пересчитать расходы', .5, .2, 100) // with minPV and minCount, if we have too little tasks
console.log('taskRatingsOneHundred', taskRatingsOneHundred)
```
## API
The package contains two methods:
### taskSimilarity(text, pv)
Returns a fraction between 0 and 1, which indicates the degree of similarity between the two strings. 0 indicates completely different strings, 1 indicates identical strings. The comparison is case-sensitive.
##### Arguments
1. text (string): The text in task
2. pv (float <= 1): probability value
# Математическое ожидание, дисперсия и среднеквадратичесвое оклонение случайной величины для задачи