{"id":21148878,"url":"https://github.com/samliebl/paragraphs-lines","last_synced_at":"2026-01-21T02:05:19.744Z","repository":{"id":249533515,"uuid":"831768884","full_name":"samliebl/paragraphs-lines","owner":"samliebl","description":"A Node.js module that splits text into paragraphs and then further divides those into lines with metadata.","archived":false,"fork":false,"pushed_at":"2024-08-03T15:13:50.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T09:49:24.340Z","etag":null,"topics":["language","language-analysis","lines","metadata","natural-language-processing","nlp","paragraph","poem","poetry","strings"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samliebl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-21T15:20:00.000Z","updated_at":"2024-09-25T20:02:46.000Z","dependencies_parsed_at":"2024-07-29T15:09:33.148Z","dependency_job_id":null,"html_url":"https://github.com/samliebl/paragraphs-lines","commit_stats":null,"previous_names":["samliebl/paragraphs-lines"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samliebl/paragraphs-lines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samliebl%2Fparagraphs-lines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samliebl%2Fparagraphs-lines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samliebl%2Fparagraphs-lines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samliebl%2Fparagraphs-lines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samliebl","download_url":"https://codeload.github.com/samliebl/paragraphs-lines/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samliebl%2Fparagraphs-lines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28622473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T23:49:58.628Z","status":"online","status_checked_at":"2026-01-21T02:00:08.227Z","response_time":86,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["language","language-analysis","lines","metadata","natural-language-processing","nlp","paragraph","poem","poetry","strings"],"created_at":"2024-11-20T09:29:38.992Z","updated_at":"2026-01-21T02:05:19.728Z","avatar_url":"https://github.com/samliebl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# paragraphs-lines\n\nThe goal is to build this out more with some plans I have in mind. At present, this NPM module exports a function that takes a text input parameter `textInput`.\n\nIt takes paramater `textInput` and splits it into paragraphs `$.text.textParagraphs[]` and lines within paragraphs as `$.text.textParagraphs[i].paragraphLines[i].lineText`. They are strings and each \"text level\" has a corresponding data object that tracks metadata about that text string. Each object within the `$.text.textParagraphs[0]` array, for example, has a `.paragraphData` object that provides such properties as `paragraphLineCount`; each line within each paragraph has a `lineData` object with corresponding properties like `lineWordCount`\n\nIt reformats this data into a JSON object that includes metadata along with the original text.\n\nIt is written in ESM format.\n\n## Usage\n\n```js\nimport { paragraphsLines } from 'paragraphs-lines';\n\n// \"After great pain, a formal feeling comes – (372)\"\n// by Emily Dickinson\n\nconst textInput = `\nAfter great pain, a formal feeling comes – (372)\n\nAfter great pain, a formal feeling comes –\nThe Nerves sit ceremonious, like Tombs –\nThe stiff Heart questions ‘was it He, that bore,’\nAnd ‘Yesterday, or Centuries before’?\n\nThe Feet, mechanical, go round –\nA Wooden way\nOf Ground, or Air, or Ought –\nRegardless grown,\nA Quartz contentment, like a stone –\n\nThis is the Hour of Lead –\nRemembered, if outlived,\nAs Freezing persons, recollect the Snow –\nFirst – Chill – then Stupor – then the letting go –\n`;\n\nconst result = paragraphsLines(textInput);\nconsole.log(JSON.stringify(result, null, 2));\n```\n\nreturns a JSON object w/ the text and data.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamliebl%2Fparagraphs-lines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamliebl%2Fparagraphs-lines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamliebl%2Fparagraphs-lines/lists"}