The two-family cluster classification is a research finding, not a
diagnostic; embedding it in the tool caused recurring bugs:
- ascii_bicorder.py had an inverted LDA sign (institutional mapped to 9,
not 1) and a stale term check ('bureaucratic') that silently disabled
the calculation after the Feb 2026 rename — output was always null
- The web app and Python script had divergent sign conventions and
divergent version-mismatch behavior (skip vs. continue with stale model)
Changes:
- bicorder.json: drop the formal/informal analysis gradient; version 1.3.0
- ascii_bicorder.py: remove all LDA/model machinery; keep hardness and
polarization as the only automated analyses
- App.svelte: remove classifier import, model constant, LDA calculation,
and form-recommendation reactive block; dispatch automated analyses by
term_left instead of array index
- Delete bicorder-classifier.ts and FormRecommendation.svelte (the latter
was imported but never rendered)
- AnalysisTransitionBanner: remove recommendation alert and prop; fix
hardcoded index checks that referenced the removed gradient
- vite.config.ts / vite-env.d.ts: stop loading bicorder_model.json
The cluster classifier lives on as research in analysis/ (scripts and
model untouched there). bicorder.txt regenerated.
62 lines
1.6 KiB
TypeScript
62 lines
1.6 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
import fs from 'fs'
|
|
import path from 'path'
|
|
|
|
// Read bicorder.json at build time
|
|
const bicorderData = JSON.parse(
|
|
fs.readFileSync(path.resolve(__dirname, '../bicorder.json'), 'utf-8')
|
|
)
|
|
|
|
export default defineConfig({
|
|
base: './',
|
|
plugins: [
|
|
svelte(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['favicon.ico', 'favicon.svg', 'icon-192.png', 'icon-512.png', 'icon-maskable-192.png', 'icon-maskable-512.png'],
|
|
manifest: {
|
|
name: 'Protocol Bicorder',
|
|
short_name: 'Bicorder',
|
|
description: 'A diagnostic tool for the study of protocols',
|
|
theme_color: '#1a1a2e',
|
|
background_color: '#1a1a2e',
|
|
display: 'standalone',
|
|
icons: [
|
|
{
|
|
src: 'icon-192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png',
|
|
purpose: 'any maskable'
|
|
},
|
|
{
|
|
src: 'icon-512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'any maskable'
|
|
},
|
|
{
|
|
src: 'icon-maskable-192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png',
|
|
purpose: 'maskable'
|
|
},
|
|
{
|
|
src: 'icon-maskable-512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'maskable'
|
|
}
|
|
]
|
|
},
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}']
|
|
}
|
|
})
|
|
],
|
|
define: {
|
|
'__BICORDER_DATA__': JSON.stringify(bicorderData)
|
|
}
|
|
})
|