Solved

Delphi 5 Thesaurus component

Posted on 2001-07-16
7
142 Views
Last Modified: 2010-04-06
I need a free Thesaurus component  with source - no add-ons   I have tried ThesDB. DLL  but I can  not  work out how to access the DLL in delphi (5),  if I use MS-word component then  I can not work out how  import results back into my delphi program. - Need Delphi source code
0
Comment
Question by:MauriceToon
7 Comments
 
LVL 44

Expert Comment

by:CrazyOne
Comment Utility
Listening
0
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 100 total points
Comment Utility
I just has a look at msth32.dll (Word 97)
ThesCheck
ThesCloseMdt
ThesInit
ThesOpenMdt
ThesTerminate
ThesVersion
are the only exported functions.
Do you have the C headers/documentation for these functions?
They seem all you need for accessing the Thesaurus files.
0
 

Author Comment

by:MauriceToon
Comment Utility
not what I was looking for
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 2

Expert Comment

by:egono
Comment Utility
you might use TWordApplication

[...]
var LangID        : OleVariant;
    Meaning       : OleVariant;
    mSysnonym     : SynonymInfo;
    i,j,k         : Integer;
    s             : string;
    mLine,mLine1  : Integer;

[...]
LangID:=wdGerman;
s:=Memo1.SelText;
if s='' then ShowMessage('Please mark word! ');
while s<>'' do
begin
  mSysnonym:=WordApplication1.SynonymInfo[s,LangId];
  if mSysnonym.Found then
  begin
    if not Assigned(ThesaurusForm) then
    begin
      ThesaurusForm:=TThesaurusForm.Create(nil);
    end;
    with ThesaurusForm do
    begin
      Edt_Word.Text:=s;
      SetLength(mSysLists,mSysnonym.MeaningCount+1);
      try
        for i:=1 to mSysnonym.MeaningCount do
        begin
          mSysLists[i-1]:=TStringList.Create;
          ListBox1.Items.Add(mSysnonym.MeaningList[i]);
          Meaning:=i;
          for j:=1 to MAXINT do
          begin
            try
              mSysLists[i-1].Add(mSysnonym.SynonymList[Meaning][j]);
              if Meaning=1 then ListBox2.Items.Add(mSysnonym.SynonymList[Meaning][j]);
            except Break; end;
          end;
        end;
        ListBox1.Items.Add('Ahnliche Begriffe');
        mSysLists[mSysnonym.MeaningCount]:=TStringList.Create;
        for i:=1 to MAXINT do
        begin
          try
            mSysLists[mSysnonym.MeaningCount].Add(mSysnonym.RelatedWordList[i]);
          except Break; end;
        end;
        k:=ShowModal;
        if (k=idOK) and (Edt_Replace.Text<>'') then
        begin
          Memo1.SelText:=Edt_Replace.Text;
          s:='';
        end else
        if (k=idRetry) then
        begin
          s:=ListBox2.Items[ListBox2.ItemIndex];
        end else
        if (k=idAbort) then  //back button
        begin
          s:=Memo1.SelText;
        end else
        begin
          s:='' ;
        end;
      finally
        ListBox1.Clear;
        ListBox2.Clear;
        for i:=0 to mSysnonym.MeaningCount do
        begin
          mSysLists[i].Free;
        end;
      end;
    end;
  end;
end;
[...]
0
 

Author Comment

by:MauriceToon
Comment Utility
HI egono,
Outstanding code, but what is SynonymInfo  and ShowModal??
Maurice
mauricetoon@yahoo.co.nz
0
 

Author Comment

by:MauriceToon
Comment Utility
HI egono,
Outstanding code, but what is wdGerman and showModal??
Maurice
mauricetoon@yahoo.co.nz
0
 

Author Comment

by:MauriceToon
Comment Utility
I now know what SynonymInfo is but not idea about
wdGerman and showModal??
Thanks
Maurice
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now