{"id":30570596,"url":"https://github.com/chai-dev682/ai_layout_generator","last_synced_at":"2025-08-28T20:18:54.885Z","repository":{"id":311495536,"uuid":"1042344939","full_name":"chai-dev682/ai_layout_generator","owner":"chai-dev682","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-24T19:45:52.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-24T23:28:26.442Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/chai-dev682.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,"zenodo":null}},"created_at":"2025-08-21T21:43:10.000Z","updated_at":"2025-08-24T19:45:56.000Z","dependencies_parsed_at":"2025-08-24T23:28:33.812Z","dependency_job_id":"5547fdb8-99a0-4fa3-a132-ee0c7f42c16f","html_url":"https://github.com/chai-dev682/ai_layout_generator","commit_stats":null,"previous_names":["chai-dev682/ai_layout_generator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/chai-dev682/ai_layout_generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fai_layout_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fai_layout_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fai_layout_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fai_layout_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chai-dev682","download_url":"https://codeload.github.com/chai-dev682/ai_layout_generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chai-dev682%2Fai_layout_generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272549469,"owners_count":24953574,"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","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"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":[],"created_at":"2025-08-28T20:18:53.952Z","updated_at":"2025-08-28T20:18:54.869Z","avatar_url":"https://github.com/chai-dev682.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deed Parser System\n\nA comprehensive system for parsing legal deed descriptions and visualizing property boundaries using AI-powered text extraction and geometric calculations.\n\n## Features\n\n- **AI-Powered Parsing**: Uses OpenAI GPT models to extract survey calls from deed text\n- **Interactive Editing**: Review and correct parsed data with an editable table interface  \n- **Geometry Calculation**: Converts bearings/distances to coordinates and calculates polygon geometry\n- **SVG Visualization**: Generate scalable vector graphics of property boundaries\n- **Multiple Export Formats**: Export as SVG, CSV, JSON, and more\n- **Flexible Configuration**: Support for different units, bearing conventions, and coordinate systems\n\n## Architecture\n\n### Frontend\n- **Streamlit** web application with tabbed interface\n- Editable data tables using `st.data_editor`\n- Real-time SVG preview and export options\n- File upload support for PDFs and text files\n\n### Backend Services\n- **OpenAI Integration** with structured outputs and function calling\n- **Geometry Calculator** using Shapely for coordinate transformations\n- **SVG Generator** for creating detailed boundary visualizations\n- **Bearing Parser** supporting multiple format conventions\n\n### Data Models\n- Pydantic models for type safety and validation\n- Canonical JSON schema for survey calls\n- Project settings and quality thresholds\n\n## Installation\n\n1. **Clone the repository:**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd deed-parser\n   ```\n\n2. **Install dependencies:**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Set up environment:**\n   ```bash\n   cp env.example .env\n   # Edit .env with your OpenAI API key\n   ```\n\n4. **Run the application:**\n   ```bash\n   streamlit run app.py\n   ```\n\n## Usage\n\n### 1. Configuration\n- Enter your OpenAI API key in the sidebar\n- Select the desired OpenAI model (gpt-4o recommended)\n- Set project units (feet/meters) and bearing convention\n- Configure Point of Beginning coordinates\n\n### 2. Text Input \u0026 Parsing\n- Paste deed text or upload a PDF file\n- Click \"Parse Deed\" to extract survey calls using AI\n- Review parsing confidence and any warnings\n\n### 3. Review \u0026 Edit\n- Use the interactive table to review extracted calls\n- Edit bearings, distances, and other parameters\n- Add or remove calls as needed\n- Recalculate geometry after changes\n\n### 4. Visualization\n- View the generated property boundary polygon\n- See closure statistics and area calculations\n- Export as SVG, CSV, or JSON formats\n\n## Supported Formats\n\n### Bearing Formats\n- Quadrant: `N 45°30'15\" E`, `S 22°10' W`\n- Azimuth: `123°45'30\"`, `123.75°`\n- Variations: `N45-30-15E`, `N 45 30 E`\n\n### Distance Units\n- Feet (`ft`), Meters (`m`)\n- Chains (`ch`), Rods (`rd`)\n- Automatic unit conversion\n\n### Curve Types\n- Radius and arc length\n- Chord bearing and chord length\n- Left/right curve direction\n- Automatic chord-to-arc calculations\n\n## Technical Details\n\n### OpenAI Integration\n- Uses structured outputs with function calling for reliable JSON extraction\n- Custom prompts optimized for deed parsing\n- Confidence scoring and fallback regex parsing\n- Support for multiple model types\n\n### Geometry Calculations\n- Coordinate system: Local grid (X=East, Y=North)\n- Azimuth convention: Degrees clockwise from North\n- Curve discretization with configurable segments\n- Closure error calculation and validation\n\n### Data Validation\n- Real-time bearing format validation\n- Unit consistency checking\n- Geometry closure analysis\n- Confidence-based quality indicators\n\n## Development\n\n### Project Structure\n```\ndeed-parser/\n├── app.py                 # Main Streamlit application\n├── src/\n│   ├── models/           # Pydantic data models\n│   ├── parsers/          # OpenAI integration\n│   ├── geometry/         # Coordinate calculations  \n│   ├── visualization/    # SVG generation\n│   └── utils/           # Utilities (bearing parser, etc.)\n├── tests/               # Unit tests\n└── requirements.txt     # Dependencies\n```\n\n### Running Tests\n```bash\npython -m pytest tests/\n```\n\n### Adding New Features\n1. Update data models in `src/models/`\n2. Extend parsers or geometry calculators\n3. Add new visualization options\n4. Update Streamlit UI components\n\n## Configuration Options\n\n### Project Settings\n- Distance units and bearing conventions\n- Point of Beginning coordinates\n- Coordinate Reference System (CRS)\n- Quality thresholds and tolerances\n\n### OpenAI Settings\n- Model selection (gpt-4o, gpt-4-turbo, gpt-3.5-turbo)\n- API key management\n- Parsing confidence thresholds\n\n## Troubleshooting\n\n### Common Issues\n1. **Low parsing confidence**: Review and manually edit calls in the table\n2. **Closure errors**: Check bearing/distance accuracy and units\n3. **Missing curve data**: Verify radius, arc length, and chord information\n4. **API errors**: Confirm OpenAI API key and model availability\n\n### Error Handling\n- Graceful degradation for incomplete data\n- Regex fallback for AI parsing failures\n- Validation warnings for data quality issues\n- Detailed error messages and stack traces\n\n## License\n\n[Add your license information here]\n\n## Contributing\n\n[Add contribution guidelines here]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchai-dev682%2Fai_layout_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchai-dev682%2Fai_layout_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchai-dev682%2Fai_layout_generator/lists"}