Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lima antinno #53

Open
wants to merge 84 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
cf9d5ee
Increase version number to 2.1.0
kleag Sep 18, 2015
ec292da
Add guards to avoid storing tokens with null micro
kleag Oct 1, 2015
d133fde
Better guard for a good vertex morph data def
kleag Oct 1, 2015
9b9af97
Ensure no morph data with null micro is used
kleag Oct 1, 2015
288be06
Corrects "Empty data for vertex" bug
kleag Oct 1, 2015
d6b1d0a
Add missing constructors
kleag Oct 7, 2015
59a0a7d
Add missing parent class constructor call
kleag Oct 7, 2015
2ff0317
Merge branch 'Lima-2.1-patches' of github.com:aymara/lima into Lima-2…
kleag Nov 2, 2015
0fc49f8
Add hunspell spellcheck and correct enchant one
kleag Nov 13, 2015
3f5ba1d
Finish integration of hunspell
kleag Nov 27, 2015
160e7ff
Correct a microcategory in a Modex
kleag Dec 2, 2015
30cb5b6
Add missing words in French dictionary
kleag Dec 2, 2015
55fb4b5
Handle an idiom with ’ instead of '
kleag Dec 2, 2015
fc064bc
Change process unit order
kleag Dec 2, 2015
c77d356
Spellchecking improvements
kleag Dec 2, 2015
a6170c2
Add conll mapping for fre
kleag Dec 7, 2015
e002f78
Allow to use CONLL dumper without a mapping file
kleag Dec 5, 2015
9bd10e2
Set the CONLL dumper to be the default one
kleag Dec 5, 2015
92ef118
Correct CONLL dumper
kleag Dec 5, 2015
b227d31
Add a named entity type column to the CONLL output
kleag Dec 5, 2015
a4ae914
Add explicit constructor for a structure to avoid a crash
kleag Dec 9, 2015
5f97af5
Give default categories to URLs
kleag Dec 9, 2015
9ab3069
Syntactic sugar
kleag Dec 9, 2015
d3e72d7
Protect LDEBUG with ifdef
kleag Feb 9, 2016
d1ccb82
Allow splitting on t_sentence_break tokenization status
kleag Feb 9, 2016
64685c7
Not propuce multiple same IndexElement in iterator
kleag Feb 17, 2016
8c69c23
Correct lemma of pronouns in fre dictionary
kleag Mar 22, 2016
2ed4deb
Better config for SRL
kleag Apr 12, 2016
a8a386f
Change the number of cols in SRL output
kleag Apr 12, 2016
133dd67
Fix position/length calculation
simonmarchal May 17, 2016
234a31c
Add aux to the list of syntactic relations
kleag May 24, 2016
817ed65
Revert the change from TEMPCOMP to aux
kleag May 24, 2016
1281624
Set the numeric status at first digit
kleag Apr 11, 2016
2cff973
Correct tokenization and norm. of negative numbers
kleag Apr 11, 2016
8e5ef72
Remove dico entries for numbers in digits
kleag Apr 11, 2016
647e6cd
Correct default token status for digit numbers
kleag Apr 11, 2016
4b1a044
Better config for SRL
kleag Apr 12, 2016
a96f79d
Change the number of cols in SRL output
kleag Apr 12, 2016
72f151d
Correct interaction with external python srl
kleag Apr 13, 2016
19e0e36
Add a process unit with python srl embedded
kleag Apr 25, 2016
ab9d321
Use QT_NO_KEYWORDS to avoid clash with Python lib
kleag Apr 25, 2016
8e617d7
Allow to use temp files instead of suffix on input
kleag Apr 25, 2016
42eb558
Correct typo in symbols
kleag Apr 25, 2016
6ff93ca
Change remaining Qt keywords to macros
kleag Apr 25, 2016
b68125f
Some Qt keywords were remaining
kleag Apr 25, 2016
2dadccf
Make Python libraries optional
kleag Apr 25, 2016
2b053c2
Missing cmake if for python
kleag Apr 26, 2016
9631877
Break circular dependency under Windows
kleag Apr 26, 2016
b870981
Don't add predicates for should not be kept tokens
kleag Apr 28, 2016
caeecec
Add FrameNet Modex
kleag Apr 28, 2016
51182d7
Correct very old memory corruption bug
kleag Apr 28, 2016
95af94c
Complete the FrameNet Modex
kleag Apr 28, 2016
d6015ae
Add information in exception messages
kleag Apr 28, 2016
2ec1125
Add information in exception messages
kleag Apr 28, 2016
d6f3b6d
Include all predicate hypothese in output
kleag Apr 28, 2016
c0fb94d
Implement less cluttering error handling
kleag Apr 28, 2016
37c8600
Allow to load FrameNet output from SRL
kleag Apr 28, 2016
711c000
Correct handling of FrameNet SRL input
kleag Apr 29, 2016
bee4ddc
Avoid a crash when there is no sentence to dump
kleag May 2, 2016
69a4a42
New parsing constraint
kleag May 26, 2016
f22df58
New eng parsing rules
kleag May 26, 2016
5a216a0
Make the FrameNet Modex available at compile time
kleag May 26, 2016
11ca9ad
Corrections on eng tokenizer
kleag May 26, 2016
90362f6
Make compile after cherry-picking
kleag Jun 3, 2016
cbb25db
Call embedded srl with language to use
kleag Jun 9, 2016
754b625
Merge
kleag Jun 13, 2016
b98bf20
Merge
kleag Jun 13, 2016
2ddeb96
Transmit language to embeded python srl
kleag Jun 30, 2016
504a428
Correct micro category in Modex
kleag Jul 26, 2016
f80548b
Correct tokenization of fre ordinal integers
kleag Oct 1, 2015
e8cd69f
Correct lemma+norm of unknown tokens with digits
kleag Apr 11, 2016
7e84e5a
Use inflected form as lemma if it is empty
kleag Jul 27, 2016
9c23510
corrected generation of bow named entity: no not generate a token dup…
romaricb Jun 27, 2016
41ed630
Avoid setting an empty string as lemma.
kleag Jul 27, 2016
99f3653
Use enum class for BoWType
kleag Jul 27, 2016
3d201a8
Merge branch 'Lima-2.1-patches' of github.com:aymara/lima into Lima-2…
kleag Aug 10, 2016
383616a
Solves partly bug #50
kleag Sep 7, 2016
26273ce
Add tva test for issue #50
kleag Sep 8, 2016
848d7e6
Correct positions in xml analysis
kleag Sep 28, 2016
448e214
Correct term lengths taking entities into account
kleag Sep 28, 2016
7ff5a8f
Code refactoring.
kleag Sep 28, 2016
1433dbd
Correct shiftFrom taking offset into account.
kleag Sep 29, 2016
b1de1ee
msg
fwantinno Oct 5, 2016
7ee7339
Solves issue #59
kleag Jun 2, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion gbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ source_dir=$PWD
if [[ $version = "rev" ]]; then
release="$current_timestamp-$current_revision"
else
release="2"
release="0"
fi

if [[ $parallel = "true" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions lima_annoqt/src/annoqt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ bool Annoqt::saveFile( const QString &fileName )

// std::cerr<<m_textEdit->document()->toHtml("utf-8").toUtf8().data() << std::endl;

foreach (SpecificEntity* entity, m_entities)
Q_FOREACH (SpecificEntity* entity, m_entities)
{
QString string = entity->string();
QRegExp rxamp("&(?!amp;)");
Expand Down Expand Up @@ -463,7 +463,7 @@ Annoqt::~Annoqt()

{
qDebug() << "Annoqt::~Annoqt";
foreach (SpecificEntity* se, m_entities)
Q_FOREACH (SpecificEntity* se, m_entities)
{
delete se;
}
Expand Down Expand Up @@ -801,7 +801,7 @@ void Annoqt::computeEntitiesMap()
{
qDebug() << "Annoqt::computeEntitiesMap";
m_entitiesMap.clear();
foreach (SpecificEntity* entity, m_entities)
Q_FOREACH (SpecificEntity* entity, m_entities)
{
for (quint32 i = entity->position(); i < entity->position()+entity->length(); i++)
{
Expand Down
2 changes: 1 addition & 1 deletion lima_annoqt/src/kcolorbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void KColorButton::setColor( const QColor &c )
if ( d->col != c ) {
d->col = c;
repaint();
emit changed( d->col );
Q_EMIT changed( d->col );
}
}

Expand Down
2 changes: 1 addition & 1 deletion lima_annoqt/src/kcolorcollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ KColorCollection::save()

str << "KDE RGB Palette\n";
str << description << "\n";
foreach (const KColorCollectionPrivate::ColorNode &node, d->colorList)
Q_FOREACH (const KColorCollectionPrivate::ColorNode &node, d->colorList)
{
int r,g,b;
node.color.getRgb(&r, &g, &b);
Expand Down
4 changes: 2 additions & 2 deletions lima_annoqt/src/kcolorcombo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void KColorComboPrivate::_k_slotActivated(int index)
internalcolor = colorList[index - 1];
}

emit q->activated(internalcolor);
Q_EMIT q->activated(internalcolor);
}

void KColorComboPrivate::_k_slotHighlighted(int index)
Expand All @@ -347,7 +347,7 @@ void KColorComboPrivate::_k_slotHighlighted(int index)
internalcolor = colorList[index - 1];
}

emit q->highlighted(internalcolor);
Q_EMIT q->highlighted(internalcolor);
}

void KColorComboPrivate::addColors()
Expand Down
22 changes: 11 additions & 11 deletions lima_annoqt/src/kcolordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void KColorCells::mouseReleaseEvent(QMouseEvent *e)

d->inMouse = false;
if (cell != -1)
emit colorSelected(cell , color(cell));
Q_EMIT colorSelected(cell , color(cell));
}

QTableWidget::mouseReleaseEvent(e);
Expand All @@ -394,7 +394,7 @@ void KColorCells::mouseDoubleClickEvent(QMouseEvent * /*e*/)
int cell = positionToCell(d->mousePos);

if (cell != -1)
emit colorDoubleClicked(cell , color(cell));
Q_EMIT colorDoubleClicked(cell , color(cell));
}


Expand Down Expand Up @@ -455,7 +455,7 @@ void KColorPatch::dropEvent(QDropEvent *event)
QColor c = KColorMimeData::fromMimeData(event->mimeData());
if (c.isValid()) {
setColor(c);
emit colorChanged(c);
Q_EMIT colorChanged(c);
}
}

Expand Down Expand Up @@ -625,12 +625,12 @@ KColorTable::KColorTablePrivate::slotShowNamedColorReadError(void)

//
// 2000-02-12 Espen Sand
// Set the color in two steps. The setColors() slot will not emit a signal
// Set the color in two steps. The setColors() slot will not Q_EMIT a signal
// with the current color setting. The reason is that setColors() is used
// by the color selector dialog on startup. In the color selector dialog
// we normally want to display a startup color which we specify
// when the dialog is started. The slotSetColors() slot below will
// set the palette and then use the information to emit a signal with the
// set the palette and then use the information to Q_EMIT a signal with the
// new color setting. It is only used by the combobox widget.
//
void
Expand Down Expand Up @@ -729,22 +729,22 @@ KColorTable::KColorTablePrivate::slotColorCellSelected(int index , const QColor&
{
if (!mPalette || (index >= mPalette->count()))
return;
emit q->colorSelected(mPalette->color(index), mPalette->name(index));
Q_EMIT q->colorSelected(mPalette->color(index), mPalette->name(index));
}

void
KColorTable::KColorTablePrivate::slotColorCellDoubleClicked(int index , const QColor& /*color*/)
{
if (!mPalette || (index >= mPalette->count()))
return;
emit q->colorDoubleClicked(mPalette->color(index), mPalette->name(index));
Q_EMIT q->colorDoubleClicked(mPalette->color(index), mPalette->name(index));
}


void
KColorTable::KColorTablePrivate::slotColorTextSelected(const QString &colorText)
{
emit q->colorSelected(m_namedColorMap[ colorText ], colorText);
Q_EMIT q->colorSelected(m_namedColorMap[ colorText ], colorText);
}


Expand Down Expand Up @@ -1175,7 +1175,7 @@ void KColorDialog::KColorDialogPrivate::slotDefaultColorClicked()
} else {
showColor(selColor, QString());
}
emit q->colorSelected(selColor);
Q_EMIT q->colorSelected(selColor);
}

void
Expand Down Expand Up @@ -1465,10 +1465,10 @@ void KColorDialog::KColorDialogPrivate::_setColor(const QColor &color, const QSt

showColor(selColor, name);

emit q->colorSelected(selColor);
Q_EMIT q->colorSelected(selColor);
}

// show but don't set into selColor, nor emit colorSelected
// show but don't set into selColor, nor Q_EMIT colorSelected
void KColorDialog::KColorDialogPrivate::showColor(const QColor &color, const QString &name)
{
bRecursion = true;
Expand Down
4 changes: 2 additions & 2 deletions lima_annoqt/src/kcolordialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ class KColorSpinBox : public QSpinBox
virtual void valueChange()
{
updateDisplay();
emit valueChanged( value() );
emit valueChanged( currentValueText() );
Q_EMIT valueChanged( value() );
Q_EMIT valueChanged( currentValueText() );
}*/

};
Expand Down
2 changes: 1 addition & 1 deletion lima_annoqt/src/kcolorvalueselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void KColorValueSelector::setChooserMode( KColorChooserMode c )
d->_mode = c;

//really needed?
//emit modeChanged();
//Q_EMIT modeChanged();
}

KColorChooserMode KColorValueSelector::chooserMode () const
Expand Down
4 changes: 2 additions & 2 deletions lima_annoqt/src/kxyselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void KXYSelector::mouseMoveEvent( QMouseEvent *e )
valuesFromPosition( e->pos().x() - w, e->pos().y() - w, xVal, yVal );
setValues( xVal, yVal );

emit valueChanged( d->xPos, d->yPos );
Q_EMIT valueChanged( d->xPos, d->yPos );
}

void KXYSelector::wheelEvent( QWheelEvent *e )
Expand All @@ -198,7 +198,7 @@ void KXYSelector::wheelEvent( QWheelEvent *e )
else
setValues( xValue(), yValue() + e->delta()/120 );

emit valueChanged( d->xPos, d->yPos );
Q_EMIT valueChanged( d->xPos, d->yPos );
}

void KXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const
Expand Down
2 changes: 1 addition & 1 deletion lima_annoqt/src/specificEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ SpecificEntity& SpecificEntity::operator=(const SpecificEntity& se)
void SpecificEntity::slotTriggered()
{
qDebug() << "SpecificEntity::slotTriggered";
emit triggered( this );
Q_EMIT triggered( this );
}

101 changes: 101 additions & 0 deletions lima_antinno/src/antinno.ResourcesIdent.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@

#ifndef ghdghscjenicfhermfuchhmfmaixfxdsqksdogq�jefqojxefoejkg
#define ghdghscjenicfhermfuchhmfmaixfxdsqksdogq�jefqojxefoejkg

/*
Code copi� de AntResourcesIdent.h

Sans doute � am�liorer

FW 30/10/2013


*/
//
// C++ Implementation : AntResourcesIdent
//
// Description: analyse les identifiants d'une ressource binaire Ant'inno
//
// Author: Jean-Yves Sage <[email protected]>, (C) 2010-2011
//
// Copyright: See COPYING file that comes with this distribution
//
////////////////////////////////////////////////////////////
#include <sstream>
#include <time.h>
#include <string>

namespace antinno {

//brief This class extracts identifiers from binary resources files

class ResourcesIdent
{
public:
//------------------------------------------------------------------------------------------------------------------------------
//param header header in memory
//param headerSize header size (for check)
ResourcesIdent(const char *header, const ::std::size_t headerSize)
: _pHeader(header), _pHeaderSize(headerSize)
{
}
//------------------------------------------------------------------------------------------------------------------------------
//return string ready to display */
::std::string toHumanReadableString()
{
unsigned char *currentPtr = (unsigned char*)_pHeader;
//UNSIGNED indispensable pour calculer les valeurs des entiers
::std::ostringstream resultoss;
//lit les noms d'identifiants
const ::std::size_t namesSize = _readInt4LE(currentPtr);
const ::std::string names = ::std::string((char*)currentPtr, namesSize);
currentPtr += namesSize;
//lit les valeurs

const ::std::size_t valuesNb = _readInt4LE(currentPtr) / 4;
::std::size_t ptrb = 0;
for (::std::size_t i=0; i<valuesNb; i++) {
if (ptrb == ::std::string::npos) {
resultoss<<"INVALIDFILE A"<<endl;
break; //plus de valeurs que de noms
}
const ::std::size_t value = _readInt4LE(currentPtr);
::std::size_t ptre = names.find(",", ptrb);
::std::string oneName = names.substr(ptrb, ptre-ptrb);
oneName.resize(20, ' ');
resultoss<<oneName<<_asciiDate(value)<<" ("<<value<<")"<<endl;
ptrb = ptre;
if (ptrb != ::std::string::npos) ptrb++; //saute la virgule
}
if (ptrb != ::std::string::npos) resultoss<<"INVALIDFILE B"<<endl; //plus de noms que de valeurs
if ((char*)currentPtr != _pHeader + _pHeaderSize) resultoss<<"INVALIDFILE C"<<endl;
return resultoss.str();
}
//------------------------------------------------------------------------------------------------------------------------------

private:

//------------------------------------------------------------------------------------------------------------------------------
const char *_pHeader;
const ::std::size_t _pHeaderSize;
//------------------------------------------------------------------------------------------------------------------------------
::std::size_t _readInt4LE(unsigned char*& ptr)
{
//on n'utilise pas les ptr++ pour eviter les optimisations du compilateur
const ::std::size_t value = ptr[0] + ptr[1]*0x100 + ptr[2]*0x10000 + ptr[3]*0x1000000;
ptr +=4;
return value;
}
//------------------------------------------------------------------------------------------------------------------------------
::std::string _asciiDate(const time_t date)
{
const ::std::string ascDate(ctime(&date));
const ::std::string::size_type nowStop = ascDate.rfind(' ');
return ascDate.substr(0,nowStop+5);
}
//------------------------------------------------------------------------------------------------------------------------------
}; // end class

} // end namespace

#endif
2 changes: 1 addition & 1 deletion lima_common/LIMACOMMONConfig-src.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# - Find LimaCommon

set(LIMA_VERSION_MAJOR "2")
set(LIMA_VERSION_MINOR "0")
set(LIMA_VERSION_MINOR "1")
set(LIMA_VERSION_RELEASE @LIMA_VERSION_RELEASE@)
set(LIMA_VERSION "${LIMA_VERSION_MAJOR}.${LIMA_VERSION_MINOR}.${LIMA_VERSION_RELEASE}")

Expand Down
4 changes: 4 additions & 0 deletions lima_common/conf/lima-common-fre.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@
<item value="DetAdv"/><!-- for things like "les plus utilisés"-->
<item value="PrepDetNum"/><!-- for things like "une femme active sur cinq est..."-->
<item value="IncInc"/><!-- to link unknown works, typically from a foreign language-->
<item value="aux"/>
<item value="auxpass"/>
<item value="det"/>
<item value="acl"/>
</list>
</group>
<group name="SyntacticAnalysis">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define LIMA_ABSTRACTFACTORYPATTERNEXPORT_H


#include <boost/strong_typedef.hpp>
#include <boost/serialization/strong_typedef.hpp>

#ifdef WIN32

Expand Down
Loading