Metadata-Version: 2.4
Name: typical-phrase-splitter
Version: 0.2.7
Summary: A package to split sentences into typical segments using OpenAI API
Home-page: https://github.com/ZiweiGu/GP-TSM
Author: Ziwei Gu
Author-email: ziweigu@g.harvard.edu
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai
Requires-Dist: spacy
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# Typical Phrase Splitter

A Python package that splits sentences into typical segments using OpenAI API.

## Installation

To install this package, run:

```bash
pip install typical-phrase-splitter

python -m spacy download en_core_web_sm

```

## Command-Line Usage

After installation, you can use the split-phrase command to split sentences into typical segments. The syntax is as follows:

```bash
split-phrase "[sentence]" "[your-openai-api-key]"
```

Optional Flags: 
-n, --num_queries (Number of times to query the API. Default is 1; if greater than 1, majority voting will be used to determine the typical segments.)

-f, --format (Output format, "json" for structured output with last_atypical_phrase, "list" for a plain list assuming no last_atypical_phrase. Default is "json")
