Coder Social home page Coder Social logo

auto-classifier's Introduction

Auto Classifier

GitHub release (latest by date) GitHub all releases

Auto Classifier is an Obsidian plugin that helps you automatically classify tag from your notes using the ChatGPT API. The plugin can analyze your note (It can be title, frontmatter, content or selected area) and suggest relevant tag based on the input with tags in your valut. This can be used for various and specific purposes, for example, DDC classification for books, keyword recommendation, research paper categorization and so on. Save you time and improving your note organization.

How to use

  • Enter your ChatGPT API key in setting tab. You can create it at OpenAI. Check api setting by the Test API call button.

  • This plugin consists of 4 Input Commands that you can run. By simply running these commands, it will automatically classify your note.

    • Classify tag from Note title
    • Classify tag from Note FrontMatter
    • Classify tag from Note Content
    • Classify tag from Selected Area
  • Toggle and Choose from different Tag Reference types. ChatGPT will select the appropriate tag from these references.

    • All tags (default)
    • Filtered Tags with regular expression
    • Manual Tags that defined manually
  • Specify the Output Type from the response of ChatGPT.

    • #Tag: at your Current Cursor or Top of Content.
    • [[WikiLink]]: at your Current Cursor or Top of Content.
    • FrontMatter: with key
    • Title Alternative: at the end of note's title
  • (Optional) Add Prefix or Suffix for the output format.

  • (Optional) Your can use your custom request for the ChatGPT API.

    • Custom Prompt Template
      • ChatGPT will respond based on this prompt. The input coming from your Command will be replaced by {{input}}, and the reference tags you set will be placed in {{reference}}.
    • Custom Chat Role
      • You can guide ChatGPT's behabior by setting this system role

Example

Use Case #1: Selected areaCurrent cursor

Use Case #2: ContentFrontMatter

Use Case #3: FrontMatterTitle

Use Case #4: TitleFrontMatter

DDC number classification

If you want use this plugin as DDC number classification, edit Custom Prompt Template like this:

Please use Dewey Decimal Classification (DDC) to classify this content:
"""
{{input}}
"""
Answer format is JSON {reliability:0~1, output:"[ddc_number]:category"}. 
Even if you are not sure, qualify the reliability and select one. 
Convert the blank spaces to "_" in the output.

LCSH classification

LCSH classification can be similar:

Please use Library of Congress Subject Headings (LCSH) to classify this content:
"""
{{input}}
"""
Answer format is JSON {reliability:0~1, output:"[First LCSH term]--[Second LCSH term]--[Third LCSH term]"}. 
Even if you are not sure, qualify the reliability and select one. 
Convert the blank spaces to "_" in the output.

Installation

  • Search Auto Classifier in the Community plugin tab of the Obsidian settings.
  • Also, you can manually download the latest release from this repository GitHub releases and extrat the ZIP file to your Obsidian plugins folder.

Support

If you encounter any issues while using this plugin or have any suggestions for improvement, please feel free to submit an issue on the GitHub repository. Pull requests are also welcome.

Author

Hyeonseo Nam

License

MIT License

auto-classifier's People

Contributors

hyeonseonam avatar gravityfargo avatar tk42 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.