Opened 16 years ago

Closed 16 years ago

#296 closed enhancement (fixed)

Add spelling suggestion to Omega

Reported by: Yevgeny Binder Owned by: Olly Betts
Priority: normal Milestone: 1.1.1
Component: Omega Version: 1.0.8
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

This is a small patch to Omega and scriptindex to enable support for spelling suggestion. To use it, in your scriptindex database definition file add the SPELL keyword to any field whose contents you want added to the spelling dictionary, reindex the database, and add the $suggestion keyword to your Omegascript output template.

A variation of this patch might instead add words to the spelling dictionary by default, and then provide a NOSPELL scriptindex keyword to prevent addition. A command-line option to scriptindex could also globally enable/disable spelling support.

Attachments (2)

query.cc.diff (1.1 KB ) - added by Yevgeny Binder 16 years ago.
scriptindex.cc.spelling.diff (2.8 KB ) - added by Yevgeny Binder 16 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by Olly Betts, 16 years ago

Keywords: spell spelling suggestion correction omega scriptindex removed
Status: newassigned

Thanks.

comment:2 by Olly Betts, 16 years ago

Hmm, the attachments are getting the wrong content type, and I can't see how to edit that - I think the ".108" is confusing things.

Can you reattach them, but with extension ".patch"?

by Yevgeny Binder, 16 years ago

Attachment: query.cc.diff added

in reply to:  2 comment:3 by Yevgeny Binder, 16 years ago

Replying to olly:

Hmm, the attachments are getting the wrong content type, and I can't see how to edit that - I think the ".108" is confusing things.

Can you reattach them, but with extension ".patch"?

Oops, I did .diff instead. Seems to work ok in Trac, though. Or do you need .patch?

by Yevgeny Binder, 16 years ago

comment:4 by Olly Betts, 16 years ago

".diff" is fine too.

I think an explicit "spell" is probably best in scriptindex.

The patches look OK, apart from the lack of corresponding documentation updates. If you could update the documentation too that would be most appreciated.

comment:5 by Olly Betts, 16 years ago

Milestone: 1.1.01.1.1

Bumping milestone to 1.1.1 as this is ready to apply (no documentation) and isn't an incompatible change.

comment:6 by Olly Betts, 16 years ago

Patched scriptindex in trunk r12515.

comment:7 by Olly Betts, 16 years ago

Patched omega in trunk r12516.

Still to do:

  • Add support to omindex
  • Update templates/query

comment:8 by Olly Betts, 16 years ago

New omindex option --spelling added in trunk r12525.

comment:9 by Olly Betts, 16 years ago

Resolution: fixed
Status: assignedclosed

OK, and the query template is sorted in trunk r12526. Marking as fixed.

Note: See TracTickets for help on using tickets.