KeyNeg Enterprise
Air-gapped sentiment analysis with custom taxonomies, bundled models, and dedicated support
Enterprise Features
Air-Gapped Deployment
No internet required. All models bundled for secure environments.
24 Industry Taxonomies
Pre-built taxonomies for Finance, Healthcare, Tech, ESG, and 20+ more industries.
Domain-Bound Licensing
Secure licensing tied to your company domain.
Dedicated Support
Priority email support and integration assistance.
Installation
KeyNeg Enterprise is distributed via our private PyPI server or as a wheel file.
Option 1: From Private PyPI Server
pip install keyneg-enterprise \
--index-url https://pypi.grandnasser.com/simple/ \
--trusted-host pypi.grandnasser.com
When prompted, enter the credentials provided in your welcome email.
Option 2: From Wheel File
If you received a .whl file directly:
pip install keyneg_enterprise-1.0.0-py3-none-any.whl
License Activation
After installation, activate your license key:
from keyneg_enterprise import activate_license
# Replace with your actual license key
activate_license("KN-ENT-xxxxxxxxxxxxxxxxxxxx-xxxxxxxx")
You should see:
License activated successfully for [Your Company Name]
New installations include a 30-day trial with full functionality. Contact us before expiration to continue using the software.
Verify Installation
from keyneg_enterprise import KeyNeg, get_license_info
# Check license status
info = get_license_info()
print(f"Status: {info['status']}")
print(f"Company: {info.get('company')}")
print(f"Expires: {info.get('expires')}")
# Test KeyNeg
kn = KeyNeg()
result = kn.analyze("I'm frustrated with the poor communication")
print(result['top_sentiment'])
Extract Sentiments
from keyneg_enterprise import KeyNeg
kn = KeyNeg()
text = "The toxic culture and micromanagement is unbearable"
sentiments = kn.extract_sentiments(text, top_n=5)
for label, score in sentiments:
print(f"{label}: {score:.3f}")
Extract Keywords
keywords = kn.extract_keywords(text, top_n=10)
for keyword, score in keywords:
print(f"{keyword}: {score:.3f}")
Full Analysis
result = kn.analyze(text)
print(f"Top Sentiment: {result['top_sentiment']}")
print(f"Negativity Score: {result['negativity_score']:.2f}")
print(f"Categories: {result['categories']}")
Batch Processing
documents = [
"I hate my job",
"The management is terrible",
"No work-life balance at all",
]
results = kn.analyze_batch(documents)
for i, result in enumerate(results):
print(f"Doc {i+1}: {result['top_sentiment']} ({result['negativity_score']:.2f})")
Summarize by Label
Group multiple documents by sentiment label to generate reports. Perfect for analyzing customer feedback, employee surveys, or reviews at scale.
reviews = [
"The service was terrible and staff was rude",
"Billing department never responds to calls",
"Product quality has declined significantly",
"Customer support is unresponsive",
"The app crashes constantly",
]
result = kn.summarize_by_label(
reviews,
top_n=3, # Sentiments per document
examples_per_label=3, # Example quotes per label
threshold=0.3 # Minimum similarity score
)
print(f"Analyzed {result['total_docs']} documents")
print(f"Found {result['unique_labels']} unique complaint types")
for label, data in result['summary'].items():
print(f"\n{label}:")
print(f" Count: {data['count']}")
print(f" Avg Score: {data['avg_score']:.2f}")
print(f" Examples:")
for ex in data['examples']:
print(f" - {ex['text'][:50]}... ({ex['score']:.2f})")
Output
Analyzed 5 documents
Found 8 unique complaint types
poor customer service:
Count: 4
Avg Score: 0.58
Examples:
- The service was terrible and staff was rude (0.72)
- Billing department never responds to calls (0.61)
- Customer support is unresponsive (0.55)
product quality issues:
Count: 2
Avg Score: 0.52
Examples:
- Product quality has declined significantly (0.58)
- The app crashes constantly (0.46)
Parameters
docs | List of documents to analyze and group |
top_n | Number of sentiment labels to consider per document (default: 3) |
examples_per_label | Maximum example quotes per label (default: 3) |
threshold | Minimum similarity threshold (default: 0.3) |
show_progress | Show progress bar during embedding (default: True) |
Returns
{
"total_docs": 5, # Documents processed
"unique_labels": 8, # Unique labels found
"summary": { # Grouped by label (sorted by count)
"poor customer service": {
"count": 4,
"avg_score": 0.58,
"examples": [
{"text": "The service was...", "score": 0.72},
...
]
},
...
}
}
Use summarize_by_label() to automatically generate complaint reports from customer feedback. The output groups similar complaints together with example quotes, making it easy to identify top issues and support them with real customer voices.
Industry Taxonomies
KeyNeg Enterprise includes 24 pre-built industry taxonomies with 65 aliases. Use the industry parameter to instantly load industry-specific keywords and categories.
Single Industry
from keyneg_enterprise import KeyNeg
# Load finance-specific taxonomy
kn = KeyNeg(industry="finance")
# Healthcare/Pharma
kn = KeyNeg(industry="healthcare")
# Technology/SaaS
kn = KeyNeg(industry="tech")
# ESG & Climate
kn = KeyNeg(industry="esg")
Multiple Industries
# Combine multiple industry taxonomies
kn = KeyNeg(industry=["finance", "regulatory", "esg"])
# Financial services with compliance focus
kn = KeyNeg(industry=["banking", "compliance", "ratings"])
List Available Industries
from keyneg_enterprise import list_industries
print(list_industries())
# ['airline', 'alternatives', 'aml', 'auto', 'automotive', 'banking', ...]
Extend vs Replace Default
By default, industry taxonomies are added to the base workforce keywords. Use extend_default=False for industry-only keywords.
extend_default=True (default): Loads ~800 base workforce keywords + industry-specific keywords. Best for general employee feedback analysis where you want to catch both workplace issues AND domain-specific terminology.
extend_default=False: Loads ONLY industry-specific keywords. Best for pure domain analysis (e.g., analyzing 10K filings for regulatory language only).
# Extend default taxonomy (default) - includes general workplace terms
# Keywords: "burnout", "micromanagement" + "capital adequacy", "disclosure violations"
kn = KeyNeg(industry="finance", extend_default=True)
print(len(kn.all_keywords)) # ~900+ keywords
# Replace default - ONLY industry-specific terms
# Keywords: "capital adequacy", "disclosure violations" (no "burnout", "micromanagement")
kn = KeyNeg(industry="finance", extend_default=False)
print(len(kn.all_keywords)) # ~200 finance-only keywords
Available Industries
General Industries
| Industry | Aliases | Categories |
|---|---|---|
| Financial Services | finance, banking | Banking, investment, insurance |
| Healthcare | healthcare, pharma | Patient experience, billing, pharmaceuticals |
| Telecommunications | telecom | Connectivity, billing, customer service |
| Technology | tech, saas | Software, subscriptions, cloud services |
| Retail | retail, ecommerce | Shipping, products, returns |
| Hospitality | travel, airline, hotel | Hotel, airline complaints |
| Gig Economy | gig, rideshare | Driver/rider, platform issues |
| Education | education, edtech | Course content, technical, financial |
| Real Estate | property | Tenant, buyer/seller issues |
| Legal | legal, law | Client, firm internal |
| Government | public_sector | Processing, service quality, benefits |
| Automotive | auto | Vehicle, dealer issues |
| Manufacturing | supply_chain | Quality, supply chain |
| Energy | utilities | Service, renewable energy |
| Media | entertainment, gaming, streaming | Streaming, gaming |
Specialized Financial Bundles
| Industry | Aliases | Categories |
|---|---|---|
| Financial Intelligence | ratings, credit_ratings | Credit ratings, market data, research |
| Regulatory | compliance, aml, kyc | AML/KYC, reporting, regulatory change |
| ESG | sustainable, climate, green_finance | Green investing, climate finance |
| Capital Markets | investment_banking | Investment banking, trading, risk |
| Corporate Intelligence | governance | Supply chain risk, governance |
| Sovereign Risk | country_risk, geopolitical | Country ratings, geopolitical risk |
| Private Equity | pe, hedge_funds, alternatives | Private markets, hedge funds |
| Real Estate Finance | cmbs, rmbs, mortgage | CMBS/RMBS, commercial real estate |
| Data Services | fintech | Trading platforms, analytics, data |
Custom Taxonomies
KeyNeg Enterprise supports loading custom taxonomies from YAML or JSON files.
Load from YAML File
kn = KeyNeg()
kn.load_taxonomy("/path/to/custom_taxonomy.yaml")
Load from JSON File
kn.load_taxonomy("/path/to/custom_taxonomy.json")
Add Keywords Programmatically
kn.add_custom_keywords(
category="my_industry",
subcategory="complaints",
keywords=["specific_term", "industry_jargon", "technical_issue"]
)
Example Taxonomy Format (YAML)
# custom_taxonomy.yaml
healthcare:
patient_complaints:
- long wait times
- poor bedside manner
- billing issues
staff_issues:
- understaffed
- burnout
- high turnover
finance:
customer_service:
- hidden fees
- poor communication
- slow response
Custom Models
Use bundled models or point to your own for air-gapped environments.
Use Bundled Model (Default)
# Uses bundled all-mpnet-base-v2 by default
kn = KeyNeg()
Point to Local Model
kn = KeyNeg(model_path="/path/to/your/model")
Use Different Model (Online)
# Only if internet is available
kn = KeyNeg(model="all-MiniLM-L6-v2", offline_only=False)
Force Offline Mode
# Strictly use bundled/local models only
kn = KeyNeg(offline_only=True)
Detection Methods
KeyNeg Enterprise includes specialized detection methods for common enterprise use cases.
Detect Departure Intent
Identify signals that an employee is considering leaving:
result = kn.detect_departure_intent("I'm updating my resume and looking for new opportunities")
print(result)
# {
# 'detected': True,
# 'confidence': 0.67,
# 'signals': ['updating resume', 'looking for jobs']
# }
Detect Escalation Risk
Identify signals of potential legal action or public complaints:
result = kn.detect_escalation_risk("I'm going to contact a lawyer and post on Glassdoor")
print(result)
# {
# 'detected': True,
# 'risk_level': 'high',
# 'signals': ['lawyer', 'glassdoor review']
# }
Get Negativity Intensity
Measure how intense the negative sentiment is:
result = kn.get_intensity("This is absolutely the worst experience ever")
print(result)
# {
# 'level': 4,
# 'label': 'extreme',
# 'indicators': ['absolutely', 'worst ever']
# }
# Levels: 1=mild, 2=moderate, 3=strong, 4=extreme
Tips & Best Practices
Start specific, then broaden. If analyzing bank complaints, try industry="banking" first. If you're missing terms, add regulatory or finance.
For Financial Document Analysis
# Pure regulatory/financial language detection
# No workplace terms like "burnout" or "toxic culture"
kn = KeyNeg(
industry=["finance", "regulatory", "esg"],
extend_default=False # Industry-only
)
For Employee Feedback Analysis
# Workplace issues + industry-specific terms
kn = KeyNeg(
industry=["tech", "saas"],
extend_default=True # Default: includes base workforce keywords
)
Check What Keywords Are Loaded
# See all loaded keywords
print(len(kn.all_keywords)) # Total count
print(kn.all_keywords[:20]) # First 20 keywords
# Get taxonomy statistics
stats = kn.get_taxonomy_stats()
print(stats)
# {'categories': 12, 'labels': 50, 'total_keywords': 905, 'unique_keywords': 905, 'source': 'default + finance, regulatory'}
Export Taxonomy for Review
# Save current taxonomy to file for inspection/modification
kn.save_taxonomy("my_taxonomy.json")
# Later, load your modified version
kn2 = KeyNeg(taxonomy_file="my_taxonomy.json")
Testing Without License
# For development/testing only
kn = KeyNeg(skip_license_check=True)
Snowflake / Size-Restricted Environments
The full Enterprise package is ~400MB due to the bundled model. For environments with size limits (like Snowflake's 250MB stage limit), request the Lite version (~80MB) which uses a smaller model.
# Lite version uses all-MiniLM-L6-v2 instead of all-mpnet-base-v2
# Same API, same taxonomies, smaller model = slightly lower accuracy
pip install keyneg_enterprise_lite-1.1.0-py3-none-any.whl
Troubleshooting
"Trial expired" Error
Your 30-day trial has ended. Contact admin@grandnasser.com to purchase a license.
"Invalid license signature" Error
Make sure you're using the exact license key provided. Don't add spaces or modify it.
"License is bound to domain" Error
Your license is tied to a specific company domain. Contact support if you need to change it.
Model Download Issues
If you're in an air-gapped environment and the model isn't bundled:
# Use offline mode only
kn = KeyNeg(offline_only=True)
# Or specify a local model path
kn = KeyNeg(model_path="/path/to/downloaded/model")
Support
Enterprise customers receive priority support:
- Email: admin@grandnasser.com
- Response Time: Within 24 business hours
- Integration Help: Available for custom deployments
Ready to Get Started?
Contact us for pricing and to start your 30-day free trial.
Contact for Pricing