Skip to content

Commit

Permalink
fix possibly-missing jmnedict part-of-speech tags
Browse files Browse the repository at this point in the history
  • Loading branch information
hlorenzi committed Feb 15, 2025
1 parent 3cdd560 commit 0119888
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/importing/jmnedict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function normalizeSenses(

for (const rawSense of rawSenses)
{
const pos = rawSense.name_type
const pos = rawSense.name_type ?? ["unc"]
//if (pos.some(p => !Api.Word.partOfSpeechNameTags.includes(p as any)))
// throw "invalid name_type"

Expand Down
2 changes: 1 addition & 1 deletion backend/src/importing/jmnedict_raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type Entry = {


export type Trans = {
name_type: Api.Word.PartOfSpeechTag[]
name_type?: Api.Word.PartOfSpeechTag[]
trans_det: string[]
xref?: string[]
}
1 change: 1 addition & 0 deletions frontend/src/framework/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export function Router(props: {
`${ err }`

Framework.Analytics.exception(message)
console.error(err)

return <Framework.Error message={ message }/>
}}>
Expand Down

0 comments on commit 0119888

Please sign in to comment.