{"id":28169263,"url":"https://github.com/vikhram-s/indianconstitution","last_synced_at":"2026-04-09T00:31:11.455Z","repository":{"id":272567729,"uuid":"917030383","full_name":"Vikhram-S/IndianConstitution","owner":"Vikhram-S","description":"A Python library for exploring the Constitution of India.","archived":false,"fork":false,"pushed_at":"2026-01-26T08:40:19.000Z","size":527,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-21T08:59:49.070Z","etag":null,"topics":["indian-constitution","nlp","nlp-library","python-library","python3","textprocessing"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/IndianConstitution/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vikhram-S.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-15T08:13:15.000Z","updated_at":"2026-01-26T08:36:00.000Z","dependencies_parsed_at":"2025-01-25T05:24:38.247Z","dependency_job_id":null,"html_url":"https://github.com/Vikhram-S/IndianConstitution","commit_stats":null,"previous_names":["vikhram-s/iconlib","vikhram-s/indianconstitution"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Vikhram-S/IndianConstitution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vikhram-S%2FIndianConstitution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vikhram-S%2FIndianConstitution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vikhram-S%2FIndianConstitution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vikhram-S%2FIndianConstitution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vikhram-S","download_url":"https://codeload.github.com/Vikhram-S/IndianConstitution/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vikhram-S%2FIndianConstitution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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":["indian-constitution","nlp","nlp-library","python-library","python3","textprocessing"],"created_at":"2025-05-15T16:16:17.740Z","updated_at":"2026-04-09T00:31:11.447Z","avatar_url":"https://github.com/Vikhram-S.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IndianConstitution \u003csmall\u003e (v.1.0.1) \u003c/small\u003e\nAdvanced Python library for accessing and analyzing the Constitution of India with DataFrame support, fuzzy search, export capabilities, and more.\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/indianconstitution?label=Python) ![PyPI - License](https://img.shields.io/pypi/l/indianconstitution?label=License\u0026color=red) ![Maintenance](https://img.shields.io/maintenance/yes/2026?label=Maintained) ![PyPI](https://img.shields.io/pypi/v/indianconstitution?label=PyPi) ![PyPI - Status](https://img.shields.io/pypi/status/indianconstitution?label=Status)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/indianconstitution?label=Monthly%20Downloads) \n![Total Downloads](https://static.pepy.tech/badge/indianconstitution?label=Total%20Downloads)\n![SemVer](https://img.shields.io/badge/versioning-SemVer-blue)\n![Wheel](https://img.shields.io/pypi/wheel/indianconstitution)\n![Docs](https://img.shields.io/badge/docs-available-brightgreen)\n---\n\n## 🚀 Installation\n\n### Basic Installation\n\n#### Using pip (PyPI)\n```bash\npip install indianconstitution\n```\n\n### With Advanced Features\n```bash\n# For DataFrame and visualization support\npip install indianconstitution[advanced]\n\n# For fuzzy search capabilities\npip install indianconstitution[fuzzy]\n\n# For all advanced features\npip install indianconstitution[all]\n```\n\n**Note:** Optional dependencies can also be installed separately:\n```bash\n# After conda install, add optional features\nconda install pandas matplotlib\npip install fuzzywuzzy python-Levenshtein\n```\n\n---\n\n## ✨ Features\n\n### Core Features\n- ✅ Full access to the Constitution of India data\n- ✅ Retrieval of individual articles and summaries\n- ✅ Keyword-based search for articles\n- ✅ Count of total articles and search by title functionality\n\n### Advanced Features\n- 🐼 **DataFrame Support**: Convert to pandas DataFrame for advanced data manipulation\n- 🔍 **Advanced Search**: Regex and fuzzy search capabilities\n- 📊 **Statistical Analysis**: Get insights about the Constitution\n- 📤 **Export Functionality**: Export to JSON, CSV, Markdown formats\n- 🔗 **Relationship Mapping**: Find articles that reference each other\n- 📈 **Visualization**: Word frequency charts and data visualization\n- 🔄 **Method Chaining**: Fluent API design for complex operations\n- 💻 **CLI Tool**: Command-line interface for quick access\n- ⚡ **Performance**: Caching and optimized data structures\n- 🎯 **Dictionary-like Access**: Access articles like `constitution[14]`\n\n---\n\n## 📖 Usage\n\n### Basic Usage\n\n```python\nfrom indianconstitution import IndianConstitution\n\n# Initialize\nindia = IndianConstitution()\n\n# Access the Preamble\nprint(india.preamble())\n\n# Get a specific article\nprint(india.get_article(14))\n\n# Search for articles\nprint(india.search_keyword('equality'))\n\n# Count articles\nprint(f\"Total articles: {india.count_articles()}\")\n```\n\n### Advanced Usage\n\n#### DataFrame Support (pandas-like interface)\n\n```python\nimport pandas as pd\nfrom indianconstitution import IndianConstitution\n\nindia = IndianConstitution()\n\n# Convert to DataFrame\ndf = india.to_dataframe()\n\n# Use pandas operations\nprint(df.head())\nprint(df.describe())\n\n# Filter articles\nfundamental_rights = df[df['title'].str.contains('Fundamental', case=False)]\nprint(fundamental_rights[['article', 'title', 'word_count']])\n\n# Sort by word count\nlongest_articles = df.nlargest(10, 'word_count')\nprint(longest_articles[['article', 'title', 'word_count']])\n```\n\n#### Advanced Search\n\n```python\n# Regex search\nresults = india.search_regex(r'\\b(equality|liberty|fraternity)\\b', case_sensitive=False)\nfor article in results:\n    print(f\"Article {article['article']}: {article['title']}\")\n\n# Fuzzy search (handles typos and partial matches)\nresults = india.fuzzy_search('fundamental rights', threshold=70, limit=10)\nfor article in results:\n    print(f\"Article {article['article']}: {article['title']}\")\n```\n\n#### Export Functionality\n\n```python\n# Export to JSON\nindia.export_json('constitution.json')\n\n# Export to CSV (requires pandas)\nindia.export_csv('constitution.csv')\n\n# Export to Markdown\nindia.export_markdown('constitution.md')\n```\n\n#### Statistical Analysis\n\n```python\n# Get comprehensive statistics\nstats = india.get_statistics()\nprint(f\"Total Articles: {stats['total_articles']}\")\nprint(f\"Total Words: {stats['total_words']:,}\")\nprint(f\"Average Words per Article: {stats['average_words_per_article']}\")\nprint(f\"Longest Article: {stats['longest_article']['title']}\")\n```\n\n---\n\n## 💻 Command-Line Interface (CLI)\n\nThe library includes a CLI tool for quick access:\n\n```bash\n# Get a specific article\nindianconstitution get 14\n\n# Search for articles\nindianconstitution search equality\n\n# Fuzzy search\nindianconstitution search --fuzzy \"fundamental rights\"\n\n# Export to JSON\nindianconstitution export json constitution.json\n\n# Show statistics\nindianconstitution stats\n\n# Display the Preamble\nindianconstitution preamble\n```\n\n---\n\n## 🔧 Requirements\n\n### Core Requirements\n- Python 3.7+\n\n### Optional Dependencies\n- `pandas\u003e=1.3.0` - For DataFrame support and CSV export\n- `matplotlib\u003e=3.3.0` - For visualization features\n- `fuzzywuzzy\u003e=0.18.0` - For fuzzy search\n- `python-Levenshtein\u003e=0.12.0` - For faster fuzzy search\n\nInstall all optional dependencies:\n```bash\npip install indianconstitution[all]\n```\n\n---\n\n## 📄 License\n\nThis project is licensed under the Apache License 2.0.\nSee the LICENSE file for more details.\n\n---\n\n## 📧 Contact\n\n**Author**: Vikhram S  \n**Email**: [vikhrams@saveetha.ac.in](mailto:vikhrams@saveetha.ac.in)  \n**GitHub**: [https://github.com/Vikhram-S/IndianConstitution](https://github.com/Vikhram-S/IndianConstitution)\n\n---\n\n## 🙏 Acknowledgments\n\nThe Constitution data is compiled from publicly available resources, ensuring authenticity and accuracy.\n\n---\n\n## 📚 Citation\n\nIf you use **IndianConstitution** in academic research, policy work, or publications, please cite it using the `CITATION.cff` file available in this repository.\n\nGitHub will automatically generate citation formats (APA, BibTeX, etc.) from this file.\n\n---\n\n## Copyright\n\u0026copy; 2026 Vikhram S. All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikhram-s%2Findianconstitution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikhram-s%2Findianconstitution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikhram-s%2Findianconstitution/lists"}