-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Automatically generate citation keys in author-year-first-three-words format during import. Japanese keys should be romanized automatically.
Dependencies
- Issue Data Files Setup #2
Requirements
Key Format
{author_lastname}-{year}-{first_three_words_of_title}
Example:
| Input | Generated Key |
|---|---|
| Author: 諏訪正樹, Year: 2018, Title: 身体が生み出すクリエイティブ | suwa-2018-karadaga-umidasuku |
| Author: John Smith, Year: 2020, Title: The Art of Programming | smith-2020-the-art-of |
Japanese Romanization
- Convert Japanese characters (hiragana, katakana, kanji) to romaji
- Use a consistent romanization system (e.g., Hepburn)
- Handle edge cases:
- Mixed Japanese/English text
- Author names with multiple kanji readings
Tasks
- Research romanization libraries (e.g., kuroshiro, wanakana)
- Implement key generation logic
- Integrate with
make importtarget - Handle duplicate key detection and resolution
- Add tests for various input patterns
Technical Considerations
- Kanji romanization may require dictionary lookup (kuroshiro + kuromoji)
- Consider fallback for unknown kanji readings
- Key should be lowercase with hyphens as separators
- Strip special characters from generated keys
Example Implementation
// Pseudocode
function generateKey(author, year, title) {
const authorRoman = romanize(getLastName(author));
const titleWords = romanize(title).split(' ').slice(0, 3).join('-');
return `${authorRoman}-${year}-${titleWords}`.toLowerCase();
}Deliverables
- Key generation module
- Integration with import workflow
- Documentation for key format
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels