This database is a complete reimplementation of
The Royalty-free Photo Gallery for Japanese language Instruction.
This version is different from the original version
in the following ways: (1) Purdue collection (Kazumi Hatasa) and Washington
&Lee University collection (Ken'ichi Ujie) have been merged into one database,
(2) topical keywords have been generated for each picture in English and in Japanese
, and (3) Japanese words in each photograph haven been entered in
the database. A search engine makes it possible to bring up sub-sets of
pictures. Audio files and video files will be added to the database in the future.
Guideline for using the photographs:
You can freely use the photographs without
any fee as long as they are used for non-profit educational purposes.
(You can download them, copy them, clip a part of it, modify them, combine
them, shrink them, enlarge them, print them large or small, etc.) When you
use them, we ask you to acknowledge the source.
Project personnel:
The project director is Kazumi Hatasa
(Department of Foreign Languages and Literatures, Purdue University)
The Washington &Lee University Collection was done by Prof. Ken'ichi
Ujie (Department of , Washington &Lee University)
This project is supported by Center for Technology-enhanced
Language Learning (Department of Foreign Languages and Literatures, Purdue
University). A partial funding comes from the Dean of School of Liberal
Arts, Purdue University. (Faculty incentive grant)
Contributing photographs:
We can now receive photographs you have and add them to this database. If
you are willing to share what you have with others, please click the
following line.
A series of English and Japanese topical keywords have been generated for each photograph.
In addition, you can conduct a search based on authentic Japanese text which appears in phtographs.
<%
Dim Data
Dim TheKey, TheEngSub, TheJapSub
Dim TheName
Dim TheGroupA,TheGroupB,TheGroupC, TheGroupD, TheGroupE, TheGroupF
Dim Str_Key
Dim Str_count
Str_count = 1
Dim TheGRP1
Dim TheGRP2
Dim LongKey
Dim Location, Counter
Dim Temp_Key, TheSmall, TheFile
Dim Num_Key
Num_Key = 0
Counter = 1
Dim Table_Count
Table_Count = 0
Dim WhichTable
WhichTable = ""
Dim Prev_F
Dim StoreKey1
Dim StoreKey2
Dim StoreKey3
Dim StoreKey4
Dim StoreKey5
Dim Int_Counter
Dim Line_Count
Line_Count = 1
Dim Next_Count
Dim Continue_Flag
Continue_Flag = 0
Dim TheNext
TheNext = 0
Dim TheNext_Count
sub convertK
Str_Key = ","
TheKey = Trim(TheKey)
While Str_count < len(TheKey) + 1
Str_Key = Str_Key & cstr(Asc(Right(TheKey, Str_count))) & ","
Str_count = Str_count + 1
Wend
Str_count = 1
end sub
sub searchp
If TheKey="" and TheName="" and TheJapSub="" then
strQuery = "SELECT * FROM " & WhichTable
Set objRS = objCon.Execute(strQuery)
Else
If TheName="" Then
If TheJapSub="" Then
strQuery = "SELECT * FROM " & WhichTable & " where " & TheKey
else
If TheKey="" Then
strQuery = "SELECT * FROM " & WhichTable & " where " & TheJapSub
else
strQuery = "SELECT * FROM " & WhichTable & " where " & TheKey & TheGRP2 & TheJapSub
End If
End If
else
If TheKey = "" then
If TheJapSub="" Then
strQuery = "SELECT * FROM " & WhichTable & " where " & TheName
else
strQuery = "SELECT * FROM " & WhichTable & " where " & TheName & TheGRP1 & TheJapSub
End If
else
If TheJapSub="" Then
strQuery = "SELECT * FROM " & WhichTable & " where " & TheName & TheGRP1 & TheKey
else
strQuery = "SELECT * FROM " & WhichTable & " where " & TheName & TheGRP1 & TheKey & TheGRP2 & TheJapSub
End If
End if
End if
'If TheName="" and TheKey="" Then
' strQuery = "SELECT * FROM " & WhichTable & " where " & TheJapSub
'else
' If TheKey = "" then
' strQuery = "SELECT * FROM " & WhichTable & " where " & TheName
' else
' strQuery = "SELECT * FROM " & WhichTable & " where " & TheName & TheGRP1 & TheKey
' response.Write "haha"
' End if
'End if
'response.write strQuery & " "
Set objRS = objCon.Execute(strQuery)
End If
If Not objRS.EOF then
If Request.Form("More") = "More" Then
While Not objRS.EOF and TheNext > 0
objRS.MoveNext
TheNext = TheNext - 1
Wend
End If
If Table_Count = 1 Then
%>
<%
End If
While Not objRS.EOF and Continue_Flag = 0
If Counter > 5 Then
Response.Write "
"
Select Case Counter
Case "1"
Response.Write StoreKey1
Case "2"
Response.Write StoreKey2
Case "3"
Response.Write StoreKey3
Case "4"
Response.Write StoreKey4
Case "5"
Response.Write StoreKey5
End Select
Response.Write "
<%
End If
End if
if Continue_Flag = 0 then
Response.Write "
"
TheFile = objRS("filename")
If Not Instr(TheFile, ".JPEG") = 0 or Not Instr(TheFile,".jpeg") = 0 Then
TheSmall = "TN_"& left(TheFile, Len(TheFile) - 5) & ".jpg"
Else
TheSmall = "TN_" & TheFile
End if
%>
_small/<%Response.Write TheSmall %> align=middle>
<% Select Case Counter
Case "1"
StoreKey1 = objRS("JKeyWord")
Case "2"
StoreKey2 = objRS("JKeyWord")
Case "3"
StoreKey3 = objRS("JKeyWord")
Case "4"
StoreKey4 = objRS("JKeyWord")
Case "5"
StoreKey5 = objRS("JKeyWord")
End Select
'Response.Write " " & objRS("JKeyWord")
Response.Write "
"
objRS.MoveNext
End if
Counter = Counter + 1
Wend
Else
Table_Count = Table_Count - 1
End if
end sub
TheKey = Request.Form("KEY")
TheEngSub = Request.Form("EngSub")
TheJapSub = Request.Form("JapSub")
TheGRP1 = Request.Form("GRP1")
TheGRP2 = Request.Form("GRP2")
NewCount=Request.Form("P_Count")
%>
<%
If Request.Form("submit")=" Search " or Request.Form("More")="More" or Not Request.Form("ViewAll")="" then
Set objCon = Server.CreateObject("ADODB.Connection")
strConnection = "DSN=picture;Database=picture;"
strConnection = strConnection & "UID=vincent;PWD=;"
objCon.Open strConnection
TheKey = Request.Form("KEY")
Prev_F = Request.Form("Prev")
TheName = Request.Form("EngSub")
TheJapSub = Request.Form("JapSub")
TheGRP1 = Request.Form("GRP1")
TheGRP2 = Request.Form("GRP2")
Select Case TheGRP1
Case "AND with next set"
TheGRP1 = "and"
Case "OR with next set"
TheGRP1 = "or"
End Select
Select Case TheGRP2
Case "AND with next set"
TheGRP2 = "and"
Case "OR with next set"
TheGRP2 = "or"
End Select
TheNext = Request.Form("Next")
TheNext_Count = Request.Form("Next_Count")
If Request.Form("submit")=" Search " then
TheNext = 0
End If
If Not Prev_F ="" and Not Request.Form("submit")=" Search " Then
TheKey = ""
TheName = ""
End If
If Not Request.Form("ViewAll")="" Then
TheKey = ""
TheName = ""
Prev_F = "more"
End If
If Not TheJapSub = "" Then
TheKey = TheJapSub
ConvertK
LongKey = "( "
Location = Instr(Str_key, ",32,")
while Not Location = 0
While Location = 1
Str_Key = Right(Str_Key, Len(Str_Key) - Location - 2 )
Location = Instr(Str_Key, ",32,")
Wend
If Not Location = 0 Then
Temp_Key = Left(Str_Key, Location)
If Num_Key = 0 Then
LongKey = LongKey & "ASubject like '%" & Temp_Key & "%' or ASubject2 like '%" & Temp_Key & "%' "
Else
LongKey = LongKey & "or ASubJect like '%" & Temp_Key & "%' or ASubject2 like '%" & Temp_Key & "%' "
End if
Num_Key = Num_Key + 1
Str_Key = Right(Str_Key, Len(Str_Key) - Location - 2)
Location = Instr(Str_Key, ",32,")
End If
WEnd
If Num_Key = 0 Then
LongKey = LongKey & "ASubject like '%" & Str_Key & "%' or ASubject2 like '%" & Str_Key & "%' )"
Else
LongKey = LongKey & "or ASubject like '%" & Str_Key & "%' or ASubject2 like '%" & Str_Key & "%' )"
End If
TheKey = LongKey
TheJapSub = TheKey
End If
TheKey = Request.Form("KEY")
If TheKey = "" Then
TheKey = Request.Form("JapSub")
TheGRP2 = "or"
End If
If Not TheKey = "" Then
ConvertK
LongKey = "( "
Location = Instr(Str_key, ",32,")
while Not Location = 0
While Location = 1
Str_Key = Right(Str_Key, Len(Str_Key) - Location - 2 )
Location = Instr(Str_Key, ",32,")
Wend
If Not Location = 0 Then
Temp_Key = Left(Str_Key, Location)
If Num_Key = 0 Then
LongKey = LongKey & "AKeyword like '%" & Temp_Key & "%' or AKeyword2 like '%" & Temp_Key & "%'"
Else
LongKey = LongKey & "or AKeyword like '%" & Temp_Key & "%' or AKeyword2 like '%" & Temp_Key &"%'"
End if
Num_Key = Num_Key + 1
Str_Key = Right(Str_Key, Len(Str_Key) - Location - 2)
Location = Instr(Str_Key, ",32,")
End If
WEnd
If Num_Key = 0 Then
LongKey = LongKey & "AKeyword like '%" & Str_Key & "%' or AKeyword2 like '%" & Str_Key & "%' )"
Else
LongKey = LongKey & "or AKeyword like '%" & Str_Key & "%' or AKeyword2 like '%" & Str_Key & "%' )"
End If
TheKey = LongKey
End If
If Not TheName = "" Then
Num_Key = 0
LongKey = "( "
Str_Key = trim(TheName)
Location = Instr(Str_Key, " ")
while Not Location = 0
Temp_Key = trim(Left(Str_Key, Location))
If Instr(Temp_Key,"?") = 0 and Instr(Temp_Key, "[") = 0 and Instr(Temp_Key,"'") = 0 and Instr(Temp_Key, "]") = 0 and Instr(Temp_Key,"\") = 0 and Instr(Temp_Key,"$") = 0 then
If Num_Key = 0 Then
LongKey = LongKey & "EKeyword like '% " & Temp_Key & " %' "
Else
LongKey = LongKey & "or EKeyword like '% " & Temp_Key & " %' "
End if
Num_Key = Num_Key + 1
End if
Str_Key = trim(Right(Str_Key, Len(Str_Key) - Location ))
Location = Instr(Str_Key, " ")
WEnd
If Num_Key = 0 Then
If Instr(Str_Key,"?") = 0 and Instr(Str_Key, "[") = 0 and Instr(Str_Key,"'") = 0 and Instr(Str_Key, "]") = 0 and Instr(Str_Key,"\") = 0 and Instr(Str_Key,"$") = 0 then
LongKey = LongKey & "EKeyword like '% " & Str_Key & " %' )"
Else
LongKey = ""
End If
Else
If Instr(Str_Key,"?") = 0 and Instr(Str_Key, "[") = 0 and Instr(Str_Key,"'") = 0 and Instr(Str_Key, "]") = 0 and Instr(Str_Key,"\") = 0 and Instr(Str_Key,"$") = 0 then
LongKey = LongKey & "or EKeyword like '% " & Str_Key & " %' )"
Else
LongKey = LongKey & " )"
End If
End If
TheName = LongKey
End If
If TheKey="" and TheName="" and TheJapSub="" and Prev_F = "" then
Response.Write "
"
Select Case Int_Counter
Case "1"
Response.Write StoreKey1
Case "2"
Response.Write StoreKey2
Case "3"
Response.Write StoreKey3
Case "4"
Response.Write StoreKey4
Case "5"
Response.Write StoreKey5
End Select
Response.Write "
"
Int_Counter = Int_Counter + 1
Wend
Else
%>
<%
End If
Else
%>
No match!
<%
End If
objRS.Close
set objRS= Nothing
%><%
End If
objCon.Close
Else
'Counter
dim FileObject
dim CounterFile
dim InPut
dim OutPut
dim OldCount
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
CounterFile = Server.MapPath ("counter.txt")
Set InPut = FileObject.OpenTextFile (CounterFile, 1, false)
OldCount = Trim(InPut.ReadLine)
NewCount = OldCount + 1
Set OutPut = FileObject.CreateTextFile (CounterFile, True)
OutPut.WriteLine(NewCount)
InPut.close
OutPut.close
Set FileObject = Nothing
Set InPut = Nothing
Set OutPut = Nothing
End If
%>