Semantropy

by cat-left-paw
5
4
3
2
1
Score: 50/100

Description

Reviews

No reviews yet.

Stats

0
stars
25
downloads
0
forks
4
days
1
days
1
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
6
commits

Latest Version

2 days ago

Changelog

日本語

新機能

  • 再構成: ツールバーの「フレーズ生成」から開きます。語彙ソースの文のつながりを使って別の流れの文章を組み立て、続きを生成したり、文章の一部をクリックして分岐したりできます。生成方式は「継ぎ目(文節)」(既定)と「形態素nグラム」、飛躍率を選べます。コピーと収集ができます。
  • 語彙ソースの重み: 「語彙を変更」で選んだノートごとに ×0.25〜×4 の重みを付けられます。すべて ×1 なら従来と同じ抽選です。
  • {{…}} で語をまとめる: 語彙ソースの中の {{猫又}} のように囲んだ部分を1つの名詞として扱います。設定の「追加の囲み記号」で 【…】 などを4組まで追加できます。対象ノートの表示は変わりません。
  • テーマ: 表示設定で本文のテーマ(既定(Obsidianのテーマ)・ライト・ダーク)と、文字色・背景色を選べます。

変更

  • 準備やシャッフルの間、本文の上に作業中の表示が出ます。
  • 本文の語をクリックすると「語の操作」メニューが開き、「でたらめ辞書で引く」も選べます。
  • 衝突フレーズの行は同じパターンで作り直します(行ごとのパターン選択はなくなりました)。操作はアイコンになり、フレーズの文字が大きくなりました。架空ことわざも同様です。
  • ポップアップがViewの下端に収まるようになりました。
  • 用語を整理しました(対象ノート、語彙ソースなど)。変換できる文章は日本語だけであることを明記しました。

注意

  • 設定の保存形式が新しくなりました。0.1.0で保存した設定は0.0.1では読めず、0.0.1に戻すと設定は既定に戻ります。
  • main.js は15,796,866 bytes(約15.8 MB)です(WebAssemblyと辞書を内包)。Obsidian Sync Standardの1ファイル5 MB上限を超えるため、Standardでは端末ごとにインストール/更新してください。

English

New

  • Recompose, in the toolbar's Phrase generation group: builds new text from how the Vocabulary Sources' sentences join. Continue it, or click a piece of the text to branch from there. Choose Joints (phrases, the default) or Morpheme n-gram, and the leap. Copy and Collect are available.
  • Vocabulary Source weights: each note selected in Change vocabulary can be weighted from ×0.25 to ×4. With every note at ×1, draws are exactly as before.
  • Enclosed terms: text like {{猫又}} in a Vocabulary Source is one noun. Extra term delimiters in the settings add up to four more pairs such as 【…】. The Target's display is unchanged.
  • Theme: Display settings choose the body theme (Default (Obsidian theme), Light or Dark) and text and background colours.

Changed

  • A working indicator appears over the body while it is prepared or reshuffled.
  • Clicking a word opens the Word actions menu, which now includes Look up in Fake Dictionary.
  • Collision rows regenerate with the same pattern (the per-row pattern selector is gone); row actions are icons and the phrase text is larger. Fake proverb rows likewise.
  • Popups fit within the view.
  • Wording is unified, and the interface states that only Japanese text can be transformed.

Notes

  • Settings use a new format. Settings saved by 0.1.0 cannot be read by 0.0.1; going back to 0.0.1 resets them to defaults.
  • main.js is 15,796,866 bytes (about 15.8 MB; it embeds WebAssembly and the dictionary), above Obsidian Sync Standard's 5 MB per-file limit; Standard users should install or update on each device.

README file from

Github

Semantropy

English | 日本語

Semantropy is a desktop-only Obsidian plugin for creative writing in Japanese. It makes unexpected variations of a Markdown note in a separate view, without changing the source note. The name combines semantic and entropy.

What you can do

  • Transform Japanese prose. Open the current note, then use Reshuffle text for another variation. The first section appears initially; Load next section adds one section at a time. Changes to the source are marked stale until you choose Refresh target. A working indicator appears over the body while it is prepared or reshuffled.
  • Choose vocabulary. Use the current note or explicitly selected notes as Vocabulary Sources. Choose Uniform or Frequency draws. Each selected note can be weighted from ×0.25 to ×4; with every note at ×1, draws are exactly as before. Nouns, independent verbs, i-adjectives and regular adverbs are enabled separately; nouns are enabled by default. Changes in the dialog take effect only after Apply Vocabulary.
  • Group words in a Vocabulary Source. Text written like {{猫又}} in a Vocabulary Source is one noun. Extra term delimiters in the settings adds up to four more pairs such as 【…】; {{…}} is always on. The Target's display is unchanged.
  • Set Text Semantropy. Off (0) leaves the text unchanged; Low (25), Medium (50), High (75) and MAX (100) progressively change more text or allow broader candidates. Intermediate whole-number values are also available. Unsupported conjugations retain the original text.
  • Change one word. Clicking a word in the body opens the Word actions menu: Shuffle this word, Restore original, Use automatic result and Look up in Fake Dictionary. Manual candidates must be observed in the active vocabulary. A one-word selection shows the number of alternatives or why none is available.
  • Make other text. Fake Dictionary creates a definition for a word and has its own Semantropy level. Collision generates 10, 20 or 50 results from random or chosen patterns, and each row can be regenerated with the same pattern. Fake proverb generates ten proverb-and-explanation pairs. Recompose builds new text from how the Vocabulary Sources' sentences join, and can continue it or branch from a chosen place. Each result has explicit Copy and Collect actions.
  • Choose how it looks. The toolbar stays visible while the body scrolls. Display settings control the body font, size, theme (Default (Obsidian theme), Light or Dark), text and background colours, ruby readings and interaction markers without changing generated text. The interface is available in Japanese and English, but only Japanese text can be transformed; command palette names remain English.

The analyzer is Lindera WebAssembly with an embedded compact IPADIC dictionary. It works locally and offline after installation. No dictionary directory or runtime download is required.

Try it in a browser

A web Playground runs Semantropy without installing anything: https://cat-left-paw.github.io/semantropy/

Paste Japanese text or pick a preset, then reshuffle it, change the vocabulary or use Recompose. Analysis and generation run entirely in the browser; the text you enter is not sent anywhere, and there is no analytics. The first visit loads about 11 MB of dictionary data. The page is in Japanese, and collected fragments are kept only in that browser.

Getting started

  1. Open a Japanese Markdown note in Obsidian Desktop 1.13.7 or later.
  2. Run Semantropy: Open from the command palette, or use the Semantropy ribbon icon.
  3. Use Load next section and Reshuffle text in the Semantropy view.
  4. Use Change vocabulary to choose Current Note or Selected Notes and a draw mode, then select Apply Vocabulary. Automatic parts of speech has a separate Apply action.
  5. Select text in the Semantropy view, then use Copy selection or Collect selection. For one word, click it and choose Look up in Fake Dictionary, use Semantropy: Define selected word, or hover over it while holding Alt on Windows or Option (⌥) on macOS. The hover modifier can be changed to Shift in the view.

Set the destination under Settings → Semantropy → Collection file and select Save before collecting. The default is Semantropy Fragments.md. New entries contain readable Markdown without metadata comments. Five optional attribution switches can add the generation type, Target note, Vocabulary notes, Text Semantropy level and local collection date; all are off by default. Existing entries are preserved. The Collection file cannot be a Target or Vocabulary Source used to produce the result.

Privacy and file access

  • Analysis, generation and dictionary use run locally. The plugin makes no runtime network requests and contains no telemetry.
  • Semantropy reads the active Target and any notes explicitly applied as Vocabulary Sources. The transformed view is built from inert elements; note images and embeds are placeholders rather than network-loaded resources.
  • The source note is never overwritten. An explicit Collect writes only to the configured Collection Markdown file. An explicit Copy writes to the clipboard; an empty or invalid selection does not copy another fragment.
  • Plugin settings are stored in Obsidian's plugin data.json: the Semantropy levels, Collection path, draw mode, display preferences (including theme and colours), hover modifier, automatic parts of speech, interface language, ribbon visibility, attribution switches and extra term delimiters. Vocabulary weights, note snapshots, tokens, generated text, manual changes and generation state are not persisted.

Limits and compatibility

  • Desktop only; mobile is unsupported. Transformation is designed for Japanese text. Vocabulary can come from the current note or selected notes, not an entire folder or Vault.
  • Semantropy displays paragraphs, simple headings, emphasis, line breaks and supported ruby. Links, code, math, tags and unsupported Markdown are protected from transformation. Links are not interactive; images and embeds appear as placeholders. This view is not Obsidian Reading view.
  • Manual verb and i-adjective changes use supported forms observed in the vocabulary; unsupported forms stay unchanged. A very large note, especially at MAX, can take several seconds to prepare. A single parser or tokenizer step may delay cancellation.
  • Template syntax such as {{date}} in a Vocabulary Source is read as a noun (date) like any other enclosed term.
  • A narrow pane with high zoom can leave little room for the body below the fixed toolbar. Vertical writing, a dedicated Collection view, folder-wide vocabulary and user-editable templates are not included.
  • 0.1.0 uses a new settings format. Settings saved by 0.1.0 cannot be read by 0.0.1; going back to 0.0.1 resets the settings to their defaults.

main.js is about 14 to 16 MB because it embeds WebAssembly and the dictionary (the macOS 0.0.1 build measured 14,184,815 bytes). The size differs by operating system and version; check the GitHub Release for the size of the asset you install. This exceeds Obsidian Sync Standard's 5 MB per-file limit. Standard users should install or update the plugin on each device rather than rely on the plugin file to sync. Sync Plus allows files up to 200 MB.

Installation

Install Semantropy from Obsidian's Community Plugins browser. To install from a GitHub Release manually, place that release's main.js, manifest.json and styles.css in:

<vault>/.obsidian/plugins/semantropy/

Reload Obsidian, then enable Semantropy under Settings → Community plugins. Use all three files from the same version.

Build from source

npm ci
npm run build

On a clean checkout, the first npm run build verifies or prepares the compact dictionary. If no verified cache exists, it downloads the Lindera IPADIC 6.0.0 archive from one pinned URL, checks its size and SHA-256, derives the compact dictionary and checks the resulting hashes before publishing it. npm run build:distribution performs the same preparation and produces only the three release files under dist/semantropy/. Later builds reuse a verified cache. A failed or unverified preparation stops the build without replacing an existing artifact. npm ci, tests, npm run dev and the plugin runtime do not download the dictionary.

After building, the source checkout can run npm run typecheck, npm run lint, npm test, npm run verify:distribution and npm run verify:reproducible. The distribution tests also require the extracted archive; the first build or npm run prepare:dictionary prepares it.

npm run verify:reproducible checks byte-for-byte reproducibility within one build environment. macOS and Windows builds may differ in compressed payload bytes and short minified identifiers; the distribution tests pin the production code after masking those payloads and normalizing those identifiers.

License and notices

Semantropy's original source is MIT licensed. The distribution includes lindera-wasm and dictionary data under their own terms; see THIRD_PARTY_NOTICES.md and NOTICE. The generated main.js includes the applicable license and notice text in its banner so it remains available in the three-file installation.

Author: Cat Left Paw / 猫乃 左手.