Hi Thomas,

I have some news =), looking for your implementation i decided to rewrite
the GrammarChecker service from 0. Your implementation was very organized,
better than the one I used to create mine (xcountable).

I'll keep trying to bridge it to java...

Bruno Sant'Anna



On 7/7/06, Thomas Lange <[EMAIL PROTECTED]> wrote:


Hello Carlos and Bruno, ^^


Could you send the attachment to Bruno and I?
I guess it can be useful to study.

Now that you ask for it I remember that attachment possibly get stripped
from postings
to the ML. I had forgotten about that.
I already planned to ask Bruno today to have a look at the attachments in
the ML to see
if he can find sth. useful as well.

So here it is now...

Kind Regards,
Thomas



Regards,

Carlos Menezes

On 7/6/06, Thomas Lange <[EMAIL PROTECTED]> wrote:

>
Hi Jocelyn,

I wrote a stub component for language guessing that produces a shell
executable and an UNO-package that can be installed within a OpenOffice
or StarOffice.

To build and run it please proceed as follows:

Copy the attached zip file in the main directory of you SDK installation
(e.g. D:\SDK\StarOffice8_SDK) and unzip it.

If not already done call "setsdkenv_windows.bat"
The environment variables OFFICE_HOME, OFFICE_PROGRAM_PATH and UNO_PATH
should now point to the cerya same OOo installation that you provided
when you ran the "configureWindows.bat" at the time you installed the SDK.
For example on my box it looks like
  OFFICE_HOME=C:\OpenOffice-680m174_pro
  OFFICE_PROGRAM_PATH=C:\OpenOffice-680m174_pro\program
  UNO_PATH=C:\OpenOffice-680m174_pro\program

if you now change in the sub directory "[LanguageGuessing]" and run
"make" in the shell everything should be successfully build.

Now you can run the sample executable with the command
"make guesslangmain.run"

Also in the sub directory "WINexample.out\bin" of the SDK there should
now be a package named " guesslang.uno.pkg".
If you start your OpenOffice installation and execute the dialog
"Tools/Package Manager" you can install that package by pressing "Add"
and selecting that mentioned package.
Now you should be able to use the component from within that Office.

To check this load the attached odt file and run the Basic macro within
it by opening "Tools/Macros/Organize Macros/StarOffice Basic" and
opening the "Module1" in "LangGuess/Standard" by selcting it and
pressing the "Edit button".
You can now run the macro.
Since in the Office you will not have the trouble of handling text
encodings (which has to be done in the sample executable) I suggest you
write your tests for the component in Basic here.

Also if you change the implementation and build it anew you have to
deinstall the previous version of this package before installing the
new one.


Now I'll give you a short description of the files and the things you
need to change to add your implementation to this stub component:
There are to IDL files
- LanguageGuessing.idl
- XLanguageGuessing.idl
which contain the definition of the service and the interface.
The latter one containing the interface description.
We can change the functions and arguments there later on to whatever
we like, but for now it should give you a sufficient starting point.

There are two C++ files as well
- guesslangmain.cxx
- guesslang.cxx
the first being the code for the shell executable and nothing else
and the second being the actual implementation of the service and
it's interface.

If we are to modify the functions in the IDL file of course we will
have to modify the C++ files accordingly.

The remaing file of interest is the
- Makefile
By adding your C/C++ files (and the ones from libtextcat) to the
variable CXXFILES you should be able to compile and link them as well.

What you need to do now is to change the code of the
functions
- LangGuess_Impl::guessLanguages and
- LangGuess_Impl::guessPrimaryLanguage
to use your implementation.
When you do so please only make calls to your functions from within this
file as far as possible.
Since we probably will make some modifications to the IDL we will
have to change those two C++ files as well (which I'm willing to do)
and thus we should avoid larger cut-copy-paste actions (if I were to
provide you new versions of those files) as much as possible.

Also currently need to hard-code the path to the sample documents from
libtextcat in your code. Later on those should be part of the package
as well and the path to them will then have to be determined at
run-time.

Please give it a try and drop me a mail if you run into problems.

If everything goes fine I like you to provide me with your code
implementing those two functions as well thus I may be able to
look at it (or maybe already run it) and give some comments.

Well, if nothing goes I like you to provide me with all your code
(as part of the [LanguageGuessing] sub directory as well in order
to see where the problems are and how they can be solved. ;-)

Thus please prepare to mail me a new version of the component
once a week from now on along with a note where you have made
changes or where you want me to look at.


Regards and have a good day,
Thomas





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Reply via email to