{"id":37067782,"url":"https://github.com/avidale/dependency-paraphraser","last_synced_at":"2026-01-14T07:58:06.463Z","repository":{"id":62567665,"uuid":"264436611","full_name":"avidale/dependency-paraphraser","owner":"avidale","description":"A sentence paraphraser based on dependency parsing and word embedding similarity.","archived":false,"fork":false,"pushed_at":"2021-09-21T10:21:41.000Z","size":62,"stargazers_count":22,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-27T11:44:36.834Z","etag":null,"topics":["natural-language-processing","paraphrase-generation","paraphraser","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avidale.png","metadata":{"files":{"readme":"README.md","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":"2020-05-16T12:52:28.000Z","updated_at":"2023-03-24T15:38:31.000Z","dependencies_parsed_at":"2022-11-03T16:30:46.531Z","dependency_job_id":null,"html_url":"https://github.com/avidale/dependency-paraphraser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/avidale/dependency-paraphraser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidale%2Fdependency-paraphraser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidale%2Fdependency-paraphraser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidale%2Fdependency-paraphraser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidale%2Fdependency-paraphraser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avidale","download_url":"https://codeload.github.com/avidale/dependency-paraphraser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidale%2Fdependency-paraphraser/sbom","scorecard":{"id":218129,"data":{"date":"2025-08-11","repo":{"name":"github.com/avidale/dependency-paraphraser","commit":"b3b393877736127c8c52b46b8d1122182ab381b3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-17T02:01:04.613Z","repository_id":62567665,"created_at":"2025-08-17T02:01:04.614Z","updated_at":"2025-08-17T02:01:04.614Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["natural-language-processing","paraphrase-generation","paraphraser","python"],"created_at":"2026-01-14T07:58:05.842Z","updated_at":"2026-01-14T07:58:06.456Z","avatar_url":"https://github.com/avidale.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dependency-paraphraser\nA sentence paraphraser based on dependency parsing \nand word embedding similarity.\n\nHow the paraphraser works:\n1. Create a random projection of the dependency tree \n2. Replace several words with similar ones\n\nThe basic usage (for Russian language) is based on Natasha library:\n\n```\npip install dependency-paraphraser natasha\n```\n\n```python\nimport dependency_paraphraser.natasha\nimport random\nrandom.seed(42)\ntext = 'каждый охотник желает знать где сидит фазан'\nfor i in range(3):\n    print(dependency_paraphraser.natasha.paraphrase(text, tree_temperature=2))\n# желает знать сидит фазан где каждый охотник\n# каждый охотник желает знать где фазан сидит\n# знать где фазан сидит каждый охотник желает\n```\n\nYou can provide your own w2v model to replace words with similar ones:\n```python\nimport compress_fasttext\nsmall_model = compress_fasttext.models.CompressedFastTextKeyedVectors.load(\n    'https://github.com/avidale/compress-fasttext/releases/download/v0.0.1/ft_freqprune_100K_20K_pq_100.bin'\n)\nrandom.seed(42)\nfor i in range(3):\n    print(dependency_paraphraser.natasha.paraphrase(text, w2v=small_model, p_rep=0.8, min_sim=0.55))\n# стремится каждый охотник знать рябчик где усаживается\n# каждый охотник хочет узнать фазан где просиживает\n# каждый охотник хочет узнать фазан где восседает\n```\n\nAlternatively, you can expand and use the w2v model from Natasha (aka `navec`):\n```python\nnavec_model = dependency_paraphraser.natasha.emb.as_gensim\nrandom.seed(42)\nfor i in range(3):\n    print(dependency_paraphraser.natasha.paraphrase(text, w2v=navec_model, p_rep=0.5, min_sim=0.55))\n# желает каждый охотник помнить фазан где лежит\n# каждый охотник желает знать фазан где сидит\n# каждый охотник оставляет понять где фазан лежит\n```\n\nFor other languages, one way to use this paraphraser is with the UDPipe library\n\n```\npip install dependency-paraphraser ufal.udpipe pyconll\n```\n\n```python\nimport dependency_paraphraser.udpipe\npath = 'english-ewt-ud-2.5-191206.udpipe'\npipe = dependency_paraphraser.udpipe.Model(path)\nprojector = dependency_paraphraser.udpipe.en_udpipe_projector\n\ntext = 'in April 2012 they released the videoclip for a new single entitled Giorgio Mastrota'\nfor i in range(3):\n    print(dependency_paraphraser.udpipe.paraphrase(text, pipe, projector=projector, tree_temperature=1))\n# they released the videoclip in April 2012 for a new entitled Mastrota single Giorgio\n# they released in April 2012 the videoclip for a entitled single new Giorgio Mastrota\n# they released the videoclip in April 2012 for a new single Giorgio Mastrota entitled\n```\n\nProjectors (models for projecting dependency trees into a flat sentence)\ncan be trained for any language, if you have a corpus of unlabeled sentences\nand a syntax parser to label them:\n\n```python\nimport dependency_paraphraser.udpipe\nimport dependency_paraphraser.train_projector\nparser = dependency_paraphraser.udpipe.Model(path_to_your_model)\n\nsents = dependency_paraphraser.train_projector.label_udpipe_sentences(\n    texts=your_corpus,\n    model=parser,\n)\nprojector = dependency_paraphraser.train_projector.train_projector(sents)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favidale%2Fdependency-paraphraser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favidale%2Fdependency-paraphraser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favidale%2Fdependency-paraphraser/lists"}