From c8737cbd9ec2627c4a03389ce3ce16d5ca468516 Mon Sep 17 00:00:00 2001 From: rey jean-Francois Date: Mon, 5 Aug 2013 12:02:41 +0200 Subject: [PATCH] bugfix info on res not done --- README | 61 +++++++++++++++++++++++++++++++++++++++++++----- main_tools/FirstPass.sh | 14 ++++++----- main_tools/SecondPass.sh | 10 ++++---- main_tools/ThirdPass.sh | 8 +++---- 4 files changed, 73 insertions(+), 20 deletions(-) diff --git a/README b/README index eaf4870..dbd2ba2 100644 --- a/README +++ b/README @@ -1,15 +1,64 @@ + ___ _____ __ __ _____ ____ ___ _ _ ___ _ + / _ \_ _| \/ | ____| _ \_ _| / \ | | |_ _| / \ + | | | || | | |\/| | _| | | | | | / _ \ | | | | / _ \ + | |_| || | | | | | |___| |_| | | / ___ \ | |___ | | / ___ \ + \___/ |_| |_| |_|_____|____/___/_/ \_\ |_____|___/_/ \_\ + + #-------------------# -# OTMEDIA README # +# OTMEDIA LIA # +# README # # version 1.0 # #-------------------# -"Observatoire Transmedia pour l'étude des évolutions et transformations du monde médiatique" +DESCRIPTION +----------- + + OTMEDIA means "Observatoire Transmedia", its main objective is to study the evolution and transformation of the media world. + The scientific objective of the project is the creation of a new generation of media observatory + based on an interactive automatic analysis system (semi-automatic) transmedia to understand + the world of information and developments. + + Web Site : http://www.otmedia.fr + + OTMEDIA LIA project is a set of tools to transcribe radio and TV shows. + +DEPENDENCIES +------------ + + + +INSTALLATION +------------ + + See the INSTALL file for the installation procedure. + + Quick install below. + + Before launch installation : + + Be certain that all dependencies are satisfied. + + Issue the following commands to the shell : + $> ./install.sh + $> export OTMEDIA_HOME=path/to/OTMEDIA/directory -OTMEDIA_HOME -install.sh -Modif a la main de fichier si on veut +ACKNOWLEDGEMENTS +---------------- + Many thanks to Jean-François Rey for useful help. -install solr + tomcat +KNOWN BUGS +---------- + Many. +COPYRIGHT +--------- + See the COPYING file. + +AUTHORS +------- + Jean-François Rey + Hugo Mauchrétien + Emmanuel Ferreira diff --git a/main_tools/FirstPass.sh b/main_tools/FirstPass.sh index 436ac87..519be23 100755 --- a/main_tools/FirstPass.sh +++ b/main_tools/FirstPass.sh @@ -130,10 +130,11 @@ fi #-------------# # GLOBAL VARS # #-------------# -OUTPUT_DIR=$(readlink -e $2) # Output directory absolute path +OUTPUT_DIR=$(readlink -e $2) # Output directory absolute path OUTPUT_DIR_BASENAME="$OUTPUT_DIR/$BASENAME/" # New OUTPUT_DIR with BASENAME PLP_FILE="$OUTPUT_DIR_BASENAME/$BASENAME.plp" # Global PLP file -PLP_DIR="$OUTPUT_DIR_BASENAME/PLP/" # Segmented PLP files directory +PLP_DIR="$OUTPUT_DIR_BASENAME/PLP/" # Segmented PLP files directory +PLP_LIST="$OUTPUT_DIR_BASENAME/plp.lst" # list of plp files SEG_FILE="$OUTPUT_DIR_BASENAME/$BASENAME.seg" # Global Seg file LBL_FILE="$OUTPUT_DIR_BASENAME/$BASENAME.lbl" # Global LBL file RES_DIR=$OUTPUT_DIR_BASENAME"/res_p1" @@ -178,6 +179,7 @@ echo "OUTPUT_DIR=$OUTPUT_DIR" >> $OUTPUT_DIR_BASENAME/FirstPass.cfg echo "OUTPUT_DIR_BASENAME=$OUTPUT_DIR_BASENAME" >> $OUTPUT_DIR_BASENAME/FirstPass.cfg echo "PLP_FILE=$PLP_FILE" >> $OUTPUT_DIR_BASENAME/FirstPass.cfg echo "PLP_DIR=$PLP_DIR" >> $OUTPUT_DIR_BASENAME/FirstPass.cfg +echo "PLP_LIST=$PLP_LIST" >> $OUTPUT_DIR_BASENAME/FirstPass.cfg echo "SEG_FILE=$SEG_FILE" >> $OUTPUT_DIR_BASENAME/FirstPass.cfg echo "LBL_FILE=$LBL_FILE" >> $OUTPUT_DIR_BASENAME/FirstPass.cfg echo "RES_DIR=$RES_DIR" >> $OUTPUT_DIR_BASENAME/FirstPass.cfg @@ -295,7 +297,7 @@ cd $OLDPWD #---------------------------------------------# print_info "[${BASENAME}] Create PLP list depending of the model" 1 # Create a list of plp files -find $PLP_DIR -type f -exec basename "{}" .plp \; | sort > $OUTPUT_DIR_BASENAME/plp.lst +find $PLP_DIR -type f -exec basename "{}" .plp \; | sort > $PLP_LIST rm $OUTPUT_DIR_BASENAME/plp_*.lst > /dev/null 2>&1 for (( i=0; $i<${#MTAG[@]} ; i++ )) @@ -303,7 +305,7 @@ do a=`grep -e "${MTAG[$i]}" $OUTPUT_DIR_BASENAME/plp.lst` if [ -n "$a" ]; then print_info "[${BASENAME}] Creating $OUTPUT_DIR_BASENAME/plp_${MODS[$i]}.lst" 3 - grep -e "${MTAG[$i]}" $OUTPUT_DIR_BASENAME/plp.lst | sort > $OUTPUT_DIR_BASENAME/plp_${MODS[$i]}.lst + grep -e "${MTAG[$i]}" $PLP_LIST | sort > $OUTPUT_DIR_BASENAME/plp_${MODS[$i]}.lst fi done @@ -361,7 +363,7 @@ done if [ "$CHECK" -eq 1 ] then ls $RES_DIR/*.seg | sed -e "s|$RES_DIR\/||g" | sed -e 's/\.seg//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp - todo=$(cat ${OUTPUT_DIR_BASENAME}/plp.lst 2> /dev/null | wc -l) + todo=$(cat ${PLP_LIST} 2> /dev/null | wc -l) if [ "$todo" -eq 0 ]; then todo=1;fi notdone=$(($todo - $(cat ${OUTPUT_DIR_BASENAME}/.tmp | wc -l))) pourcentage=$((($notdone*100)/$todo)) @@ -370,7 +372,7 @@ then then print_error "[${BASENAME}] Check ${ERRORFILE}" print_log_file "${ERRORFILE}" "ERROR : Segs not done [" - diff ${OUTPUT_DIR_BASENAME}/plp.lst ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> ${ERRORFILE} + diff ${PLP_LIST} ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> ${ERRORFILE} print_log_file "${ERRORFILE}" "] $pourcentage% $BASENAME" else print_log_file "$LOGFILE" "P1 OK ${BASENAME} | $(date +'%d/%m/%y %H:%M:%S')" diff --git a/main_tools/SecondPass.sh b/main_tools/SecondPass.sh index 0166b2f..ba68956 100755 --- a/main_tools/SecondPass.sh +++ b/main_tools/SecondPass.sh @@ -123,6 +123,7 @@ then OUTPUT_DIR_BASENAME=$FIRSTPASS_DIR PLP_FILE_P1=$(cat $FIRSTPASS_CONFIG_FILE | grep "PLP_FILE=" | cut -f2 -d"=") PLP_DIR_P1=$(cat $FIRSTPASS_CONFIG_FILE | grep "PLP_DIR=" | cut -f2 -d"=") + PLP_LIST_P1=$(cat $FIRSTPASS_CONFIG_FILE | grep "PLP_LIST=" | cut -f2 -d"=") SEG_FILE_P1=$(cat $FIRSTPASS_CONFIG_FILE | grep "SEG_FILE=" | cut -f2 -d"=") LBL_FILE_P1=$(cat $FIRSTPASS_CONFIG_FILE | grep "LBL_FILE=" | cut -f2 -d"=") RES_DIR_P1=$(cat $FIRSTPASS_CONFIG_FILE | grep "RES_DIR=" | cut -f2 -d"=") @@ -199,6 +200,7 @@ echo "BASENAME=$BASENAME" >> $OUTPUT_DIR_BASENAME/SecondPass.cfg echo "FIRSTPASS_DIR=$FIRSTPASS_DIR" >> $OUTPUT_DIR_BASENAME/SecondPass.cfg echo "PLP_DIR_P1=$PLP_DIR_P1" >> $OUTPUT_DIR_BASENAME/SecondPass.cfg echo "PLP_FILE_P1=$PLP_FILE_P1" >> $OUTPUT_DIR_BASENAME/SecondPass.cfg +echo "PLP_LIST_P1=$PLP_LIST_P1" >> $OUTPUT_DIR_BASENAME/SecondPass.cfg echo "OUTPUT_DIR=$OUTPUT_DIR" >> $OUTPUT_DIR_BASENAME/SecondPass.cfg echo "OUTPUT_DIR_BASENAME=$OUTPUT_DIR_BASENAME" >> $OUTPUT_DIR_BASENAME/SecondPass.cfg echo "LST=$LST" >> $OUTPUT_DIR_BASENAME/SecondPass.cfg @@ -279,9 +281,9 @@ do then print_warn "[${BASENAME}] Speeral output error : check $LOGFILE" 2 print_log_file $LOGFILE "WARN : Speeral number of output ERROR $LST/$speaker.lst" - ls $RES_DIR/*.seg | grep -e "$speaker" | sed -e "s|$RES_DIR\/||" | sed -e 's/\.seg//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp + ls $RES_DIR/*.seg | grep -e "${speaker}" | sed -e "s|${RES_DIR}\/||" | sed -e 's/\.seg//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp print_log_file $LOGFILE "Segs (and treil) not done :\n[" - diff $LST/$speaker.lst ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> $LOGFILE + diff ${LST}/${speaker}.lst ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> $LOGFILE print_log_file $LOGFILE "] [$(date +'%d/%m/%y %H:%M:%S')]" rm ${OUTPUT_DIR_BASENAME}/.tmp #exit 1 @@ -299,7 +301,7 @@ done if [ $CHECK -eq 1 ] then ls $RES_DIR/*.treil | sed -e "s|$RES_DIR\/||g" | sed -e 's/\.treil//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp - todo=$(cat ${PLP_FILE_P1} | wc -l) + todo=$(cat ${PLP_LIST_P1} | wc -l) if [ $todo -eq 0 ]; then todo=1;fi notdone=$(($todo - $(cat ${OUTPUT_DIR_BASENAME}/.tmp | wc -l))) pourcentage=$((($notdone*100)/$todo)) @@ -307,7 +309,7 @@ then then print_error "[${BASENAME}] Check $ERRORFILE" print_log_file "$ERRORFILE" "ERROR : Treil not done [" - diff ${PLP_FILE_P1} ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> $ERRORFILE + diff ${PLP_LIST_P1} ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> ${ERRORFILE} print_log_file "$ERRORFILE" "] $pourcentage% $BASENAME" else print_log_file "$LOGFILE" "P2 OK $BASENAME | $(date +'%d/%m/%y %H:%M:%S')" diff --git a/main_tools/ThirdPass.sh b/main_tools/ThirdPass.sh index 380fd56..f9a42e4 100755 --- a/main_tools/ThirdPass.sh +++ b/main_tools/ThirdPass.sh @@ -138,7 +138,7 @@ then LST=$(cat $SECONDPASS_CONFIG_FILE | grep "^LST=" | cut -f2 -d"=") HMM=$(cat $SECONDPASS_CONFIG_FILE | grep "^HMM=" | cut -f2 -d"=") PLP_DIR_P1=$(cat $SECONDPASS_CONFIG_FILE | grep "^PLP_DIR_P1=" | cut -f2 -d"=") - PLP_FILE_P1=$(cat $SECONDPASS_CONFIG_FILE | grep "^PLP_FILE_P1=" | cut -f2 -d"=") + PLP_LIST_P1=$(cat $SECONDPASS_CONFIG_FILE | grep "^PLP_LIST_P1=" | cut -f2 -d"=") else print_error "[${BASENAME}] Can't find $SECONDPASS_CONFIG_FILE file" print_warn "[${BASENAME}] Will use default directories and files" 2 @@ -146,7 +146,7 @@ else LST=$PASS_DIR/lists HMM=$PASS_DIR/hmm PLP_DIR_P1=$PASS_DIR/PLP - PLP_FILE_P1=$PASS_DIR/plp.lst + PLP_LIST_P1=$PASS_DIR/plp.lst fi OUTPUT_DIR_BASENAME=$PASS_DIR @@ -236,7 +236,7 @@ done if [ $CHECK -eq 1 ] then ls $RES_DIR/*.treil 2>/deV/null | sed -e "s|$RES_DIR\/||g" | sed -e 's/\.treil//' | sort > ${OUTPUT_DIR_BASENAME}/.tmp - todo=$(cat ${PLP_FILE_P1} 2>/dev/null | wc -l) + todo=$(cat ${PLP_LIST_P1} 2>/dev/null | wc -l) if [ $todo -eq 0 ]; then todo=1;fi notdone=$(($todo - $(cat ${OUTPUT_DIR_BASENAME}/.tmp | wc -l))) pourcentage=$((($notdone*100)/$todo)) @@ -244,7 +244,7 @@ then then print_error "[${BASENAME}] Check $ERRORFILE" print_log_file "$ERRORFILE" "ERROR : Treil not done [" - diff ${PLP_FILE_P1} ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> $ERRORFILE + diff ${PLP_LIST_P1} ${OUTPUT_DIR_BASENAME}/.tmp | grep -e "^< " | sed -e "s/< //" >> $ERRORFILE print_log_file "$ERRORFILE" "] $pourcentage% $BASENAME" else print_log_file "$LOGFILE" "P3 OK $BASENAME | $(date +'%d/%m/%y %H:%M:%S')" -- 1.8.2.3